The very dirty workaround for the above was the execution of several resolve commands with no-retry option to prevent running of the cluster-relation-hook:
$ juju resolve etcd/1 --no-retry
As a side effect juju finally had 3 etcd units, however the member remove was not able to run due to wrong leader address in the hook, so etcdctl was still showing 4 units. The etcd/1 required a manual removal:
snap.etcdctl --endpoint https://<new-leader-ip>:2379 remove member <etcd-1-membership-id>
The very dirty workaround for the above was the execution of several resolve commands with no-retry option to prevent running of the cluster- relation- hook:
$ juju resolve etcd/1 --no-retry
As a side effect juju finally had 3 etcd units, however the member remove was not able to run due to wrong leader address in the hook, so etcdctl was still showing 4 units. The etcd/1 required a manual removal:
snap.etcdctl --endpoint https://<new-leader- ip>:2379 remove member <etcd-1- membership- id>