jplana / python-etcd

A python client for etcd
Other
520 stars 210 forks source link

python-etcd equivalent for `etcdctl --no-sync` #207

Closed timfeirg closed 7 years ago

timfeirg commented 7 years ago

I'm doing this thing where I have to connect to a remote etcd proxy from my local machine, but I can't connect to the real etcd cluster nodes, so I have to use

$ etcdctl --no-sync --endpoints http://**.**.**.**:2379 ls "/eru-core"

to issue any etcdctl commands, otherwise I get:

$ etcdctl --endpoints http://10.x.x.17:2379 ls "/eru-core"
Error:  client: etcd cluster is unavailable or misconfigured
error #0: client: endpoint http://10.x.x.11:2379 exceeded header timeout
error #1: client: endpoint http://10.x.x.12:2379 exceeded header timeout
error #2: client: endpoint http://10.x.x.13:2379 exceeded header timeout

But with python-etcd, I can't seem to find this --no-sync mode, and so I can't use python-etcd in my local develop environment.

lavagetto commented 7 years ago

I'm not sure what your problem is, but what you want is achieved if you set allow_reconnect to False when initializing the client.