Replies: 4 comments 1 reply
-
Snapshots are stored locally on each node. Pruning on one node only removes snapshots from that node. What did you see in the docs that made you expect that running the prune command on one node would also have any effect on other nodes?
This error suggests that you've already got |
Beta Was this translation helpful? Give feedback.
-
Hello @brandond , Sorry, my point is that the command isn't working on all others nodes. I've also noticed that this is the same as the "list" command in fact : it only shows the snapshot on "one" node, not the local snapshot. So pruning the snapshot has no effect on others nodes. Regards |
Beta Was this translation helpful? Give feedback.
-
I got it. It is really easy to see this issue with a simple "rke2 etcd-snapshot list" ; on every node, it always shows the same output. I think the command reads the server from "/etc/rancher/rke2/config.yaml" , and only list the snapshot on this node, not on the current/localnode. (in my case, the first node used to boostrap the cluster) Using :
works. |
Beta Was this translation helpful? Give feedback.
-
My actual problem is that I thought that the different Which is wrong, all So depending on how the server variable is configured (Round-robin DNS, Elastic IP ...) you get random results. So to get it works, I need to specify So yes, the sentence |
Beta Was this translation helpful? Give feedback.
-
Environmental Info:
Cluster Configuration:
3 servers / 3 Agents
Describe the bug:
"rke2 snapshot command" don't let us to remove snapshots on all nodes.
Documentation about pruning snapshot isn't up to date.
Steps To Reproduce:
on 1st node :
ls -l /var/lib/rancher/rke2/server/db/snapshots | wc -l 57
Then :
rke2 etcd-snapshot prune --etcd-snapshot-retention 5 --name etcd-snapshot
This runs without issues, but it seems to remove only the snapshot on one node only :
On another etcd node, the snapshot directory is full :
On other nodes, running the previous command does nothing and listing snapshots is showing the snapshop on the first node only
Could you clarify documentation with the "good" command to prune etcd snaphosts on all etcd nodes ?
Expected behavior:
Pruning snaphost on all nodes, or at least running the same command on every nodes should work.
Actual behavior:
Only pruning snaphost on one node.
Additional context / logs:
The documentation here ( https://docs.rke2.io/backup_restore#prune-snapshots ) tells us to run the following command :
rke2 etcd-snapshot prune --snapshot-retention <NUM-OF-SNAPSHOTS-TO-RETAIN>
When running with a value, I got the following :
The documentation is at least not up to date.
Beta Was this translation helpful? Give feedback.
All reactions