-
Notifications
You must be signed in to change notification settings - Fork 328
Open
Description
The etcdutl snapshot restore examples in "Restoring with updated membership" and "End-2-End Example" do not work.
To me there are two problems
-
Error: required flag(s) "data-dir" not set
The examples are missing the required flag data-dir -
If I add the missing data-dir flag I get an error when I set the initial-advertise-peer-urls to host2
$ etcdutl snapshot restore /tmp/db --name pve1 --initial-cluster pve1=http://10.70.6.1:2380,pve2=http://10.70.6.2:2380,pve3=http://10.70.6.3:2380 --initial-cluster-token pvecluster1 --initial-advertise-peer-urls http://10.70.6.2:2380 --data-dir /var/lib/etcd/pve1 --skip-hash-check=true
2025-12-09T10:07:44+01:00 info netutil/netutil.go:112 resolved URL Host {"url": "http://10.70.6.2:2380", "host": "10.70.6.2:2380", "resolved-addr": "10.70.6.2:2380"}
2025-12-09T10:07:44+01:00 info netutil/netutil.go:112 resolved URL Host {"url": "http://10.70.6.1:2380", "host": "10.70.6.1:2380", "resolved-addr": "10.70.6.1:2380"}
Error: --initial-cluster has pve1=http://10.70.6.1:2380 but missing from --initial-advertise-peer-urls=http://10.70.6.2:2380 (resolved urls: "http://10.70.6.2:2380" != "http://10.70.6.1:2380")
If I replace the IP of host2 with the IP of host1 in the initial-advertise-peer-urls the restore works, but I am totally unsure if this is a bug in the documentation or a bug in the syntaxparser.
Tested on debian 13 with etcd 3.5.16-4
Metadata
Metadata
Assignees
Labels
No labels