lunar+ build / install failures: rpds-py, jsonschema, tenacity

Bug #2031439 reported by Corey Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snap Layer
Fix Committed
Undecided
Unassigned
charm-octavia-diskimage-retrofit
Fix Released
Undecided
Unassigned
charm-ovn-central
Fix Released
Undecided
Unassigned
charm-ovn-chassis
Fix Released
Undecided
Unassigned

Bug Description

Charm build on master is failing due to jsonschema->rpds-py->rust:
https://launchpadlibrarian.net/682124658/buildlog_charm_ubuntu_lunar_ppc64el_charm-ovn-chassis.master.latest_BUILDING.txt.gz

(This is from https://launchpad.net/~openstack-charmers/charm-ovn-chassis/+charm/charm-ovn-chassis.master.latest)

For some reason, I wasn't able to recreate this locally when building for lunar using the same charmcraft version (2.4.0).

Regardless I built with what I think is the fix, by pinning jsonschema in charm-ovn-chassis/src/wheelhouse.txt:
 jsonschema<4.18.0 # jsonschema 4.18.0 depends on Rust (via rpds-py)

^ This would offically get fixed in layer-ovn:

:: charmtools.build.tactics: # layer:ovn
:: charmtools.build.tactics: jsonschema

Deploying that newly built charm resulted in:

2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 Traceback (most recent call last):
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-chassis-0/charm/hooks/install", line 8, in <module>
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 basic.bootstrap_charm_deps()
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-chassis-0/charm/lib/charms/layer/basic.py", line 123, in bootstrap_charm_deps
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 activate_venv()
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-chassis-0/charm/lib/charms/layer/basic.py", line 421, in activate_venv
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 layer.import_layer_libs()
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-chassis-0/charm/lib/charms/layer/__init__.py", line 24, in import_layer_libs
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 import_module('charms.layer.{}'.format(module_name))
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 return _bootstrap._gcd_import(name[level:], package, level)
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "<frozen importlib._bootstrap_external>", line 940, in exec_module
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-chassis-0/charm/lib/charms/layer/snap.py", line 20, in <module>
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 import tenacity
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-chassis-0/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 450, in <module>
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 from tenacity._asyncio import AsyncRetrying
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-chassis-0/.venv/lib/python3.11/site-packages/tenacity/_asyncio.py", line 28, in <module>
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 class AsyncRetrying(BaseRetrying):
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-chassis-0/.venv/lib/python3.11/site-packages/tenacity/_asyncio.py", line 36, in AsyncRetrying
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 @asyncio.coroutine
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 ^^^^^^^^^^^^^^^^^
2023-08-15 20:13:07 WARNING unit.ovn-chassis/0.install logger.go:60 AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?

Looking back at the charm build, tenacity is pinned by layer snap:

:: charmtools.build.tactics: # layer:snap
:: charmtools.build.tactics: # Newer versions of tenacity rely on `typing` which is in stdlib in
:: charmtools.build.tactics: # python3.5 but not python3.4. We want to continue to support
:: charmtools.build.tactics: # python3.4 (Trusty)
:: charmtools.build.tactics: tenacity<5.0.4

layer-ovn pulls in layer snap:

https://github.com/openstack-charmers/charm-layer-ovn/blob/master/layer.yaml#L4C5-L4C15

which pins tenacity at:

https://git.launchpad.net/layer-snap/tree/wheelhouse.txt

It looks like the coroutine error is fixed in a newer release of tenacity, but we would need to change the pin in layer snap to pick that up.

Related branches

summary: - lunar+ build / install failures
+ lunar+ build / install failures: rpds-py, jsonschema, tenacity
description: updated
description: updated
no longer affects: layer-snap
Felipe Reyes (freyes)
Changed in layer-snap:
status: New → Fix Committed
Revision history for this message
Adam Dyess (addyess) wrote :
Download full text (4.1 KiB)

Hi @corey.bryant

etcd charm 750 (and perhaps others) now cannot deploy in jammy -- i'm not necessarily asking for a revert -- just want to understand how to upgrade forward to work in jammy and focal

2023-08-18 00:34:26 DEBUG unit.etcd/0.install logger.go:60 Processing ./wheelhouse/tenacity-8.2.2.tar.gz
2023-08-18 00:34:27 DEBUG unit.etcd/0.install logger.go:60 Installing build dependencies: started
2023-08-18 00:34:30 DEBUG unit.etcd/0.install logger.go:60 Installing build dependencies: finished with status 'error'
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 error: subprocess-exited-with-error
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 × pip subprocess to install build dependencies did not run successfully.
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 │ exit code: 1
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 ╰─> [6 lines of output]
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 Looking in links: wheelhouse
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 Processing ./wheelhouse/setuptools-41.6.0.zip
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 Preparing metadata (setup.py): started
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 Preparing metadata (setup.py): finished with status 'done'
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 ERROR: Could not find a version that satisfies the requirement setuptools_scm[toml]>=3.4 (from versions: 1.17.0)
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 ERROR: No matching distribution found for setuptools_scm[toml]>=3.4
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 [end of output]
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 note: This error originates from a subprocess, and is likely not a problem with pip.
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 error: subprocess-exited-with-error
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 × pip subprocess to install build dependencies did not run successfully.
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 │ exit code: 1
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 ╰─> See above for output.
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 note: This error originates from a subprocess, and is likely not a problem with pip.
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 Traceback (most recent call last):
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 File "/var/lib/juju/agents/unit-etcd-0/charm/hooks/install", line 8, in <module>
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 basic.bootstrap_charm_deps()
2023-08-18 00:34:30 WARNING unit.etcd/0.install logger.go:60 File "/var/lib/juju/agents/unit-etcd-0/charm/lib/charms/layer/basic.py", line 226, in bootst...

Read more...

Revision history for this message
Adam Dyess (addyess) wrote :

It seems we can get past most of these charm upgrade issues by building new edge charms with 3.x/stable channel of the charm snap.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Marking as fix released as new charm builds have been fixed.

Changed in charm-octavia-diskimage-retrofit:
status: New → Fix Released
Changed in charm-ovn-central:
status: New → Fix Released
Changed in charm-ovn-chassis:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.