kragniz / kragniz/python-etcd3
etcd connection failed in client
- Dominant language
- Python
- Stars
- 450
- Forks
- 194
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I met a error while using ca to build a client:
```
>>> import etcd3 as etcd
>>> client = etcd.client(host='127.0.0.1', port=2379, ca_cert="/etc/etcd/pki/apiserver-etcd-client.crt", cert_key="/etc/etcd/pki/apiserver-etcd-client.key", cert_cert="/etc/etcd/pki/ca.crt")
>>> client.get('foo')
Traceback (most recent call last):
File "", line 1, in
client.get('foo')
File "/root/go/src/github.com/kubernetes-sigs/etcdadm/etcd3/lib/python3.8/site-packages/etcd3/client.py", line 283, in get
range_response = self.get_response(key, **kwargs)
File "/root/go/src/github.com/kubernetes-sigs/etcdadm/etcd3/lib/python3.8/site-packages/etcd3/client.py", line 48, in handler
_translate_exception(exc)
File "/root/go/src/github.com/kubernetes-sigs/etcdadm/etcd3/lib/python3.8/site-packages/etcd3/client.py", line 32, in _translate_exception
raise exception
etcd3.exceptions.ConnectionFailedError: etcd connection failed
```
What make me confuse is that etcdctl works well, but the lib failed.
Contributor guide
Research direction
Start with etcd3/client.py, especially client.get(), get_response(), and _translate_exception(), then compare the shown certificate arguments with the working etcdctl configuration. Reproduce the get('foo') failure and determine the connection mismatch; done means the same client setup succeeds or the incompatibility is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100