Re: One command to check if all etcd serverd are up and if all masters are connected to this etcd nodes?
etcdhealth probably is sufficient but in any case I was recently wondering myself what etcdhealth measured + does it gaurantee the nodes are consistent, synced, no split brain? We used to do something like this: curl -L -X PUT http://node1:2379/v2/keys/message -d value="ABCD" && curl -L http://node2:2379/v2/keys/message | grep -q ABCD && curl -L http://node3:2379/v2/keys/message | grep -q ABCD To guarantee that writes were working + consistent across the cluster. jay vyas On Fri, Jan 13, 2017 at 8:04 AM, Aleksandar Lazic wrote: > Hi. > > In case the peer* stuff doesn't work I have used this command. > Just as plan B. > > ### > /usr/bin/etcdctl --peers \ > $( awk -F= '/ETCD_LISTEN_CLIENT_URLS=/ {print $2}' < /etc/etcd/etcd.conf > ) \ > --debug \ > --ca-file /etc/origin/master/master.etcd-ca.crt \ > --key-file /etc/origin/master/master.etcd-client.key \ > --cert-file /etc/origin/master/master.etcd-client.crt \ > cluster-health > ### > > BR Aleks > > > > On Fri, 13 Jan 2017 12:57:24 +0100 *Diego Castro > >* wrote > > You can check cluster health with etcdctl command, just run the following > command on one of yours etcd servers: > > $ cd /etc/etcd/ > > $ etcdctl --cert-file peer.crt --key-file peer.key --ca-file ca.crt -C > https://:2379 cluster-health > > > --- > Diego Castro / The CloudFather > GetupCloud.com - Eliminamos a Gravidade > > 2017-01-13 7:24 GMT-03:00 Stéphane Klein : > > > ___ > users mailing list > users@lists.openshift.redhat.com > http://lists.openshift.redhat.com/openshiftmm/listinfo/users > > Hi, > > I'm wondering if there are a command to check etcd servers status? > Check if all etcd nodes are up. > > ``` > etcdClientInfo: > ca: master.etcd-ca.crt > certFile: master.etcd-client.crt > keyFile: master.etcd-client.key > urls: > - https://etcd-1.priv.example.com:2379 > - https://etcd-2.priv.example.com:2379 > - https://etcd-3.priv.example.com:2379 > ``` > > Check if this configuration is valid on all OpenShift masters. > > Something like `oc get nodes`. > > I try `oc status` but I haven't information about etcd configure. > > Best regards, > Stéphane > -- > Stéphane Klein > blog: http://stephane-klein.info > cv : http://cv.stephane-klein.info > Twitter: http://twitter.com/klein_stephane > > ___ > users mailing list > users@lists.openshift.redhat.com > http://lists.openshift.redhat.com/openshiftmm/listinfo/users > > --- > Mit freundlichen Grüßen > Aleksandar Lazic - ME2Digital e. U. > https://me2digital.online/ > UID-Nr.: ATU71765716 > IBAN: AT27 1420 0200 1096 9086 > Firmenbuch: 462678 i > > > ___ > users mailing list > users@lists.openshift.redhat.com > http://lists.openshift.redhat.com/openshiftmm/listinfo/users > > ___ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users
Re: One command to check if all etcd serverd are up and if all masters are connected to this etcd nodes?
Hi. In case the peer* stuff doesn't work I have used this command. Just as plan B. ### /usr/bin/etcdctl --peers \ $( awk -F= '/ETCD_LISTEN_CLIENT_URLS=/ {print $2}' < /etc/etcd/etcd.conf ) \ --debug \ --ca-file /etc/origin/master/master.etcd-ca.crt \ --key-file /etc/origin/master/master.etcd-client.key \ --cert-file /etc/origin/master/master.etcd-client.crt \ cluster-health ### BR Aleks On Fri, 13 Jan 2017 12:57:24 +0100 Diego Castrowrote You can check cluster health with etcdctl command, just run the following command on one of yours etcd servers: $ cd /etc/etcd/ $ etcdctl --cert-file peer.crt --key-file peer.key --ca-file ca.crt -C https:// :2379 cluster-health --- Diego Castro / The CloudFather GetupCloud.com - Eliminamos a Gravidade 2017-01-13 7:24 GMT-03:00 Stéphane Klein : ___ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users Hi, I'm wondering if there are a command to check etcd servers status? Check if all etcd nodes are up. ``` etcdClientInfo: ca: master.etcd-ca.crt certFile: master.etcd-client.crt keyFile: master.etcd-client.key urls: - https://etcd-1.priv.example.com:2379 - https://etcd-2.priv.example.com:2379 - https://etcd-3.priv.example.com:2379 ``` Check if this configuration is valid on all OpenShift masters. Something like `oc get nodes`. I try `oc status` but I haven't information about etcd configure. Best regards, Stéphane -- Stéphane Klein blog: http://stephane-klein.info cv : http://cv.stephane-klein.info Twitter: http://twitter.com/klein_stephane ___ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users --- Mit freundlichen Grüßen Aleksandar Lazic - ME2Digital e. U. https://me2digital.online/ UID-Nr.: ATU71765716 IBAN: AT27 1420 0200 1096 9086 Firmenbuch: 462678 i ___ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users
Re: One command to check if all etcd serverd are up and if all masters are connected to this etcd nodes?
You can check cluster health with etcdctl command, just run the following command on one of yours etcd servers: $ cd /etc/etcd/ $ etcdctl --cert-file peer.crt --key-file peer.key --ca-file ca.crt -C https://:2379 cluster-health --- Diego Castro / The CloudFather GetupCloud.com - Eliminamos a Gravidade 2017-01-13 7:24 GMT-03:00 Stéphane Klein : > Hi, > > I'm wondering if there are a command to check etcd servers status? > Check if all etcd nodes are up. > > ``` > etcdClientInfo: > ca: master.etcd-ca.crt > certFile: master.etcd-client.crt > keyFile: master.etcd-client.key > urls: > - https://etcd-1.priv.example.com:2379 > - https://etcd-2.priv.example.com:2379 > - https://etcd-3.priv.example.com:2379 > ``` > > Check if this configuration is valid on all OpenShift masters. > > Something like `oc get nodes`. > > I try `oc status` but I haven't information about etcd configure. > > Best regards, > Stéphane > -- > Stéphane Klein > blog: http://stephane-klein.info > cv : http://cv.stephane-klein.info > Twitter: http://twitter.com/klein_stephane > > ___ > users mailing list > users@lists.openshift.redhat.com > http://lists.openshift.redhat.com/openshiftmm/listinfo/users > > ___ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users