kragniz / kragniz/python-etcd3
Lease refresh issues when running etcd proxy
- Dominant language
- Python
- Stars
- 450
- Forks
- 194
- PR merge metrics
- No merged PRs in 30d
Description
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:
``` python
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 "", line 1, in
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
Contributor guide
Research direction
Start with etcd3/leases.py and etcd3/client.py, especially refresh() and refresh_lease(), then reproduce the lease refresh through an etcd proxy using the reported Python 2.7 and etcd 3.3.8 setup. Done means lease.refresh() completes successfully through the proxy, with a regression test covering that path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100