Bug 1464401 - etcd restore clarifications
etcd restore clarifications
Status: NEW
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Vikram Goyal
Vikram Goyal
Vikram Goyal
Depends On:
  Show dependency treegraph
Reported: 2017-06-23 06:59 EDT by Eduardo Minguez
Modified: 2018-03-24 03:01 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eduardo Minguez 2017-06-23 06:59:20 EDT
Document URL: https://docs.openshift.com/container-platform/3.5/admin_guide/backup_restore.html#cluster-restore-multiple-member-etcd-clusters

Section Number and Name: admin_guide/backup_restore

Describe the issue: Restore procedure should be explained better and remove the hardcoded values for etcd ips to clarify what they mean or where you can find them.

etcdctl --cert-file=/etc/etcd/peer.crt \
    --key-file=/etc/etcd/peer.key \
    --ca-file=/etc/etcd/ca.crt \
    --peers="," \
    ls /

IPs should be explained...

Update the value of peerURLs using the etcdctl member update command by passing the member ID obtained from the previous step:

# etcdctl --cert-file=/etc/etcd/peer.crt \
    --key-file=/etc/etcd/peer.key \
    --ca-file=/etc/etcd/ca.crt \
    --peers=",," \
    member update 511b7fb6cc0001

But then you add an IP which is not explained where it came from. Something like telling it is the IP where etcd will listen for cluster peers and how to get it (like "ss -l4n | grep 2380")

For each member, add it to the cluster using the values that can be found in that system’s etcd.conf file:

# etcdctl --cert-file=/etc/etcd/peer.crt \
    --key-file=/etc/etcd/peer.key \
    --ca-file=/etc/etcd/ca.crt \
    --peers="," \
    member add

Added member named with ID 4e1db163a21d7651 to cluster


But if it is an existing cluster, ETCD_NAME can be different in /etc/etcd/etcd.conf so it would be nice to check it first, and explain ETCD_INITIAL_CLUSTER variable can be different in /etc/etcd/etcd.conf of an existing host (it happened to me as I had 3 hosts so I assumed it will work...)

Suggestions for improvement: 

Additional information: 

It would be nice to have an alias for etcdctl as it requires a lot of parameters... something like:

alias oetcdctl='etcdctl --cert-file=/etc/etcd/peer.crt --key-file=/etc/etcd/peer.key --ca-file=/etc/etcd/ca.crt --peers=",,"'
Comment 1 Eduardo Minguez 2017-06-23 07:09:34 EDT
I forgot to mention, that as current instructions are for ETCDv2, maybe it would be nice to add a warning note saying that even if OCP installs etcd version 3, it uses etcd version 2 mechanisms in the backup section, because otherwise it can be confusing if you check the official etcd documentation for etcd version 3.

Note You need to log in before you can comment on or make changes to this bug.