Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix snapshot directory permission #76

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

michalskalski
Copy link
Contributor

Missing executable bit for owner of snapshot directory prevented
creating snapshot files.

{"level":"error","ts":"2022-07-21T13:21:38.612Z","caller":"etcd/server.go:490","msg":"failed to snapshot","error":"failed to save snapshot: open /var/lib/snapshots/etcd-2_0000000000000009_etcd.backup3390438042: permission denied","stacktrace":"github.com/quentin-m/etcd-cloud-operator/pkg/etcd.(*Server).runSnapshotter\n\texternal/etcd_cloud_operator/pkg/etcd/server.go:490"}
{"level":"error","ts":"2022-07-21T13:21:38.613Z","caller":"etcd/server.go:291","msg":"failed to write etcd snapshot out [written bytes: 0]","error":"meta 0 copy: io: read/write on closed pipe","stacktrace":"github.com/quentin-m/etcd-cloud-operator/pkg/etcd.(*Server).snapshot.func1\n\texternal/etcd_cloud_operator/pkg/etcd/server.go:291"}
ubuntu@ubuntu:~$ kubectl exec -it etcd-2 -- ls -l /var/lib/
total 0
drwx------ 3 1000 3000 20 Jul 21 13:16 etcd
drw------- 2 1000 3000  6 Jul 21 13:16 snapshots

with change proposed in commit:

{"level":"info","ts":"2022-07-21T13:47:12.388Z","caller":"etcd/server.go:241","msg":"snapshot \"etcd-2_0000000000000009_etcd.backup\" saved successfully in 3.360749ms (0.02 MB)"}
ubuntu@ubuntu:~$ kubectl exec etcd-2 -- ls -l /var/lib/
total 0
drwx------ 3 1000 3000 20 Jul 21 13:42 etcd
drwx------ 2 1000 3000 58 Jul 21 13:47 snapshots

Missing executable bit for owner of snapshot directory prevented
creating snapshot files.
@Quentin-M
Copy link
Owner

Weird I’ve never seen that, but no big deal - thanks.

@Quentin-M Quentin-M merged commit e152581 into Quentin-M:master Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants