etcd-io / etcd

Distributed reliable key-value store for the most critical data of a distributed system
https://etcd.io
Apache License 2.0
47.86k stars 9.77k forks source link

Python etcd3 client library is not able to read ca cert #18535

Closed oshi36 closed 2 months ago

oshi36 commented 2 months ago

Bug report criteria

What happened?

I am trying to take a snapshot of etcd via etcd3 python client library and my code looks like this :

 import etcd3
  etcd = etcd3.client(
                  host='xx.xx.xx.xx',
                  port='2379',
                  cert_cert='/etc/kubernetes/pki/etcd/server.crt',
                  cert_key='/etc/kubernetes/pki/etcd/server.key',
                  ca_cert='/etc/kubernetes/pki/etcd/ca.crt'
                )
            print("Client connected:", etcd)
            etcd.snapshot('etcd_backup.db')
            print("Snapshot taken successfully.")
    except Exception as e:
             print("Error:", e)

I am getting this error

image

And if I remove the ca_cert path then I get ETCD connection failed.

What did you expect to happen?

I expect etcd3 client to recognize ca cert and get connected to etcd

How can we reproduce it (as minimally and precisely as possible)?

Install pip install etcd3 python etcd client library

Anything else we need to know?

No response

Etcd version (please run commands below)

image

Etcd configuration (command line flags or environment variables)

# paste your configuration here

Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)

```console $ etcdctl member list -w table # paste output here $ etcdctl --endpoints= endpoint status -w table # paste output here ```

Relevant log output

No response

ivanvc commented 2 months ago

Hi, @oshi36. Thanks for opening this issue. However, we don't support Python's etcd3 library. By checking PyPI, it looks like its repository is https://github.com/kragniz/python-etcd3.

I suggest opening an issue there so that you can get support from the maintainers of that project.