Open babueter opened 4 years ago
Same error here.
There is no way to remove this exception using the public APIs.
There is no callback_thread.join()
and the Watcher._run()
method seems to have no terminating conditions.
After using an watcher, the following shutdown code can reliably reproduce the issue. Otherwise, abrupt interruption of the callback thread may print garbled exception tracebacks.
etcd.close()
if etcd.watcher._callback_thread:
etcd.watcher._callback_thread.join()
Description: The callback thread throws an exception when calling close on client if a watch has been started. Even if the watch is canceled the thread remains and throws a ValueError at etcd3/watch.py line 126.
Code to reproduce:
Error message:
python version: Python 3.6.9
pip freeze: asn1crypto==0.24.0 coverage==5.0.3 crc32c==2.0 cryptography==2.1.4 etcd3==0.11.1 grpcio==1.26.0 idna==2.6 keyring==10.6.0 keyrings.alt==3.0 numpy==1.18.1 protobuf==3.11.2 pycrypto==2.6.1 pygobject==3.26.1 pyxdg==0.25 PyYAML==5.3 rdbd==0.0.1 SecretStorage==2.3.1 six==1.13.0 tenacity==6.0.0
etcd --version: etcd Version: 3.2.17 Git SHA: Not provided (use ./build instead of go build) Go Version: go1.10 Go OS/Arch: linux/amd64
operating system: Docker version 19.03.5, build 633a0ea
Dockerfile FROM ubuntu:18.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes \ etcd \ python3 \ python3-pip \ supervisor && \ mkdir /python
ENV DEBUG true ENV ETCD_NAME provider ENV ETCD_DATA_DIR /var/lib/etcd ENV ETCD_INITIAL_CLUSTER_STATE new ENV ETCD_INITIAL_CLUSTER_TOKEN etcd-cluster-01 ENV ETCDCTL_API=3 ENV CLUSTER_SEED_NODES node1,node2,node3
etcd_start.sh