-
Notifications
You must be signed in to change notification settings - Fork 268
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
Unable to restore from snapshot - ETCD permission denied #6466
Comments
I believe you'll need to set the umask to 0020 in both your shell, and in the rke2 systemd unit. Remember that you need to do a Closing this as a duplicate of #4313 |
@brandond I have just tried using
Then I have updated
and started
This happened because
Originally before doing cluster reset it was owned by |
And just |
It does, but when I restart rke2-server So the only way to get it somehow working is to wait while with currently running rke2-server it will attempt to restart failing etcd container |
I am very confused how you ended up with /opt/kubernetes/etcd. If you'd just set the RKE2 data-dir to /opt/kubernetes the etcd folder would be under /opt/kubernetes/server/db/etcd - so I suspect you've got some symlinks or bind mounts in place here? Or did are you overriding our datastore paths via etcd-arg? Something is definitely screwy with your environment beyond just the umask. |
I really suspect that you've set |
I had perf related issues so I had to move etcd data to SSD.
rke2 data-dir is still |
Yeah, don't do that. We don't expect the etcd files to be anywhere except DATADIR/server/db/etcd. Move the whole thing with the rke2 |
Oh, ok... my motivation was to reduce unnecessary disk activity on etcd data store. |
Yeah that's totally valid, we just don't handle users overriding the etcd paths using etcd-arg. We expect it to be where we want to put it. |
Cool, I'll try that. Thank you! |
@brandond I have tried moving back etcd data path back to |
Environmental Info:
RKE2 Version:
1.27.15-rke2-r1
Node(s) CPU architecture, OS, and Version:
System
umask
is set to0027
Cluster Configuration:
3 servers 6 workers
Describe the bug:
https://docs.rke2.io/backup_restore#restoring-a-snapshot-to-existing-nodes fails with
profile: cis
I am trying to follow restore on existing node procedure and can't get it working following steps in the doc.
Steps To Reproduce:
rke2 etcd-snapshot save --name test-1
service rke2-server stop
rke2 server --cluster-reset --cluster-reset-restore-path=test-1-ip-172-23-99-35.eu-central-1.compute.internal-1722630988.zip
Expected behavior:
Actual behavior:
Additional context / logs:
I have tried to set
umask 0022
mentioned in this issue #4313And it actually helps to execute cluster reset command but then when I am starting up service rke2-server back etcd fails again with:
Note:
/opt/kubernetes/etcd/
is my custom etcd data-pathAfter cluster reset command with
umask 0022
ownership of/opt/kubernetes/etcd/data/member/snap/db
is changed to root which causing error above.I can fix ownership of
/opt/kubernetes/etcd/data/member/snap/db
manually to etcd user and with next etcd container restart it will work but if I will restart rke2-server issue will happen again...I have also tried to set UMask=0022 on rke2-server system unit I didn't change anything.
The text was updated successfully, but these errors were encountered: