kragniz / python-etcd3

Python client for the etcd API v3
Apache License 2.0
429 stars 181 forks source link

Lease refresh issues when running etcd proxy #560

Open daMupfel opened 6 years ago

daMupfel commented 6 years ago

When running the etcd proxy and connecting python-etcd3 to it i can't refresh leases anymore.

Environment: python: 2.7 python-etcd3: 0.8.1 etcd/etcd proxy: 3.3.8

Code:

client = etcd3.client(host='127.0.0.1', port=23790)
lease = client.lease(60)
lease.refresh()

Error:

 lease.refresh()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/bin/active_python/lib/python2.7/site-packages/etcd3/leases.py", line 24, in refresh
    return list(self.etcd_client.refresh_lease(self.id))
  File "/opt/bin/active_python/lib/python2.7/site-packages/etcd3/client.py", line 42, in handler
    _translate_exception(exc)
  File "/opt/bin/active_python/lib/python2.7/site-packages/etcd3/client.py", line 39, in handler
    for data in f(*args, **kwargs):
  File "/opt/bin/active_python/lib/python2.7/site-packages/etcd3/client.py", line 688, in refresh_lease
    credentials=self.call_credentials):
  File "/opt/bin/active_python/lib/python2.7/site-packages/grpc/_channel.py", line 366, in next
    return self._next()
  File "/opt/bin/active_python/lib/python2.7/site-packages/grpc/_channel.py", line 357, in _next
    raise self
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with (StatusCode.CANCELLED, context canceled)>

The perl client also seems to have the same issue: https://github.com/etcd-io/etcd/issues/9751

Sheph commented 5 years ago

Environment: python: 2.7 python-etcd3: 0.10.0 etcd/etcd proxy: 3.3.9

the same problem. any progress on this ?

Mityuha commented 5 years ago

Environment: python: 3.6.7 python-etcd3: 0.10.0 etcd/etcd proxy: 3.2.10

the same problem EDIT: Fixed it! Going to make PR on the weekend EDIT2: https://github.com/kragniz/python-etcd3/pull/845

ssampath commented 4 years ago

I am running into this issue as well in my setup. I manually patched changes to client.py and I don't see the problem anymore.

I see that the fix is still in 'open' state. Any update on when this fix will be available.

Mityuha commented 4 years ago

I'm not even sure if someone from developers know about this bug. @kragniz ,tell us, please, that you know and what you do think about it. Almost 2 years has passed