You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/09/13 09:20:08 UTC

[GitHub] [apisix-helm-chart] xzycn opened a new issue, #344: How should I restore ETCD deployed in K8S?

xzycn opened a new issue, #344:
URL: https://github.com/apache/apisix-helm-chart/issues/344

   I have done some procedures for this:
   1. copy a snapshot file to someplace named etcd-snapshot.db
   2. scale the statefulset to 0
   3. start a static pod with etcdctl  and mount the pvc used by etcd members
   4. execute the restore command:
   ```bash
   etcdctl snapshot restore --skip-hash-check etcd-snapshot.db --initial-cluster=apisix-etcd-0=http://apisix-etcd-0.apisix-etcd-headless.apisix.svc.cluster.local:2380,apisix-etcd-1=http://apisix-etcd-1.apisix-etcd-headless.apisix.svc.cluster.local:2380,apisix-etcd-2=http://apisix-etcd-2.apisix-etcd-headless.apisix.svc.cluster.local:2380 --initial-cluster-token=etcd-cluster-k8s --initial-advertise-peer-urls=http://apisix-etcd-2.apisix-etcd-headless.apisix.svc.cluster.local:2380 --name apisix-etcd-2  --data-dir=/opt/nfsdata/apisix-data-apisix-etcd-2-pvc-f8ef09a4-e8f2-404d-8d14-63b905e324be/data
   ```
   but the command has a problem: the pods have been shut down,therefore there is no pod-domain exists,get errors:
   ```bash
   {"level":"warn","ts":1663053636.7199378,"caller":"netutil/netutil.go:121","msg":"failed to resolve URL Host","url":"http://apisix-etcd-2.apisix-etcd-headless.apisix.svc.cluster.local:2380","host":"apisix-etcd-2.apisix-etcd-headless.apisix.svc.cluster.local:2380","retry-interval":1,"error":"lookup apisix-etcd-2.apisix-etcd-headless.apisix.svc.cluster.local on 192.168.0.2:53: no such host"}
   ```
   If I restore without extra options:
   ```bash
   etcdctl snapshot restore --skip-hash-check etcd-snapshot.db --data-dir=/opt/nfsdata/apisix-data-apisix-etcd-2-pvc-f8ef09a4-e8f2-404d-8d14-63b905e324be/data
   ```
   All things are OK except that the node start as a single-node,**_etcdctl member list_** only shows itself :(
   
   So, how should I restore ETCD deployed in K8S, thank you in advance.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-helm-chart] tokers commented on issue #344: How should I restore ETCD deployed in K8S?

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #344:
URL: https://github.com/apache/apisix-helm-chart/issues/344#issuecomment-1245177774

   @xzycn I think this issue is not related to APISIX. It's totally an ETCD operation skill. Try to find help from ETCD community.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-helm-chart] xzycn commented on issue #344: How should I restore ETCD deployed in K8S?

Posted by GitBox <gi...@apache.org>.
xzycn commented on issue #344:
URL: https://github.com/apache/apisix-helm-chart/issues/344#issuecomment-1245196546

   Maybe, this probelm comes from apisix-helm-chart, I thought I can get some help from here.
   Anyway, thank you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org