anbox-cloud-core: etcd/jammy: hook failed: "install" due to "error in Tempita setup command: use_2to3 is invalid."
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Anbox Cloud |
Fix Released
|
High
|
Simon Fels | ||
Etcd Charm |
Invalid
|
Undecided
|
Unassigned |
Bug Description
The anbox-cloud/-core/ charm uses an older revision of
the etcd charm that does not support the jammy release
(install hook fails).
juju proceeds with the etcd deployment on jammy anyway
as it seems to ignore that for _bundles_, but it fails
w/ that specific reason if you deploy just etcd (below).
The (full/non-core) anbox-cloud charm uses a revision
that actually supports jammy, so it should be good.
Updating the anbox-cloud-core bundle for an etcd charm
revision as anbox-cloud (non-core) should address that
(see comment #3).
Workarounds:
- to use an overlay to unpin the revision (comment #3)
- manually address the failure on the unit (description)
...
$ juju download --quiet anbox-cloud-core && unzip -q anbox-cloud-
jammy
691
$ juju download --quiet anbox-cloud && unzip -q anbox-cloud_
jammy
718
...
$ juju deploy etcd --series jammy --revision 691 --channel stable etcd-r691
ERROR series "jammy" not supported by charm, supported series are: focal, bionic, xenial. Use --force to deploy the charm anyway.
$ cat bundle.yaml
series: jammy
applications:
etcd-r691:
charm: etcd
revision: 691
channel: stable
$ juju deploy ./bundle.yaml
Located charm "etcd" in charm-hub, channel stable
Executing changes:
- upload charm etcd from charm-hub for series jammy with revision 691 with architecture=amd64
...
Deploy of bundle completed.
$ juju deploy etcd --series jammy --revision 718 --channel stable etcd-r718
Located charm "etcd" in charm-hub, revision 718
Deploying "etcd-r718" from charm-hub charm "etcd", revision 718 in channel stable on jammy
$ juju status
...
etcd-r691/0* error idle 1 10.5.3.114 hook failed: "install"
etcd-r718/0* blocked idle 2 10.5.3.207 Missing relation to certificate authority.
...
...
Original Description:
`juju status` during deployment shows:
```
etcd/0* error idle 0 10.5.1.196 hook failed: "install"
```
Debug log shows:
```
$ juju debug-log -i etcd/0 --replay --no-tail
...
unit-etcd-0: 16:59:58 INFO juju.worker.uniter found queued "install" hook
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install error: subprocess-
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install × python setup.py egg_info did not run successfully.
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install │ exit code: 1
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install ╰─> [1 lines of output]
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install error in Tempita setup command: use_2to3 is invalid.
...
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install Traceback (most recent call last):
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install File "/var/lib/
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install basic.bootstrap
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install File "/var/lib/
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install check_call([pip, 'install', '-U', reinstall_flag, '--no-index',
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install File "/usr/lib/
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install raise CalledProcessEr
unit-etcd-0: 17:02:48 WARNING unit.etcd/0.install subprocess.
x', '--no-cache-dir', '-f', 'wheelhouse', 'charmhelpers=
==5.0.3', 'Jinja2==2.11.3', 'pyaml==21.10.1', 'PyYAML==5.3.1', 'pbr==5.8.1']' returned non-zero exit status 1.
unit-etcd-0: 17:02:49 ERROR juju.worker.
...
```
The issue seems to be the deprecation of `use_2to3` in setuptools 58, per web searches.
Reproducer:
$ juju ssh etcd/0
$ . /var/lib/
$ pip install -U --force-reinstall --no-index -f /var/lib/
Workaround:
$ juju ssh etcd/0
$ sudo -s
# . /var/lib/
# pip install 'setuptools<58'
...
Successfully installed setuptools-57.5.0
# exit
$ exit
$ juju resolved etcd/0
Within some time:
```
etcd/0* active idle 0 10.5.1.196 2379/tcp Healthy with 1 known peer
```
Seen on Ubuntu 22.04 / Jammy:
```
$ juju ssh etcd/0 'lsb_release -cs; python3 -V'
jammy
Python 3.10.6
```
I'm fairly confident that this has been fixed already since we added Jammy support to the charm[1], which went out with the CK 1.25 release. Specifically, removing charms. templating. jinja2 from the wheelhouse was necessary to prevent Tempita from being pulled in as a dependency.
What revision of the etcd charm did you encounter this with? The charm revision should appear in the output of `juju status`.
[1]: https:/ /github. com/charmed- kubernetes/ layer-etcd/ pull/200