Skip to content

Commit 1746d4a

Browse files
authored
Merge pull request #87086 from lahinson/ocpbugs-45743-etcd-snapshot
[OCPBUGS-45743]: Updating HCP procedure to take etcd snapshot
2 parents ec89e9f + c0b5fbf commit 1746d4a

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

modules/backup-etcd-hosted-cluster.adoc

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@ The following example uses signature version 2. If you are in a region that supp
5454
[source,terminal]
5555
----
5656
BUCKET_NAME=somebucket
57+
CLUSTER_NAME=cluster_name
5758
FILEPATH="/${BUCKET_NAME}/${CLUSTER_NAME}-snapshot.db"
5859
CONTENT_TYPE="application/x-compressed-tar"
5960
DATE_VALUE=`date -R`
6061
SIGNATURE_STRING="PUT\n\n${CONTENT_TYPE}\n${DATE_VALUE}\n${FILEPATH}"
6162
ACCESS_KEY=accesskey
6263
SECRET_KEY=secret
6364
SIGNATURE_HASH=`echo -en ${SIGNATURE_STRING} | openssl sha1 -hmac ${SECRET_KEY} -binary | base64`
65+
HOSTED_CLUSTER_NAMESPACE=hosted_cluster_namespace
6466
6567
oc exec -it etcd-0 -n ${HOSTED_CLUSTER_NAMESPACE} -- curl -X PUT -T "/var/lib/data/snapshot.db" \
6668
-H "Host: ${BUCKET_NAME}.s3.amazonaws.com" \
@@ -89,6 +91,20 @@ $ oc get secret <hosted_cluster_name>-etcd-encryption-key -o=jsonpath='{.data.ke
8991
+
9092
You can decrypt this key when restoring a snapshot on a new cluster.
9193

94+
. Restart all etcd-writer deployments by entering the following command:
95+
+
96+
[source,terminal]
97+
----
98+
$ oc scale deployment -n <control_plane_namespace> --replicas=3 kube-apiserver openshift-apiserver openshift-oauth-apiserver
99+
----
100+
101+
. Resume the reconciliation of the hosted cluster by entering the following command:
102+
+
103+
[source,terminal]
104+
----
105+
$ oc patch -n <hosted_cluster_namespace> -p '[\{"op": "remove", "path": "/spec/pausedUntil"}]' --type=json
106+
----
107+
92108
.Next steps
93109

94-
Restore the etcd snapshot.
110+
Restore the etcd snapshot.

0 commit comments

Comments
 (0)