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)
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 Traceback (most recent call last):
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/charm/hooks/install", line 8, in <module>
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 basic.bootstrap_charm_deps()
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/charm/lib/charms/layer/basic.py", line 123, in bootstrap_charm_deps
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 activate_venv()
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/charm/lib/charms/layer/basic.py", line 421, in activate_venv
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 layer.import_layer_libs()
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/charm/lib/charms/layer/__init__.py", line 24, in import_layer_libs
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 import_module('charms.layer.{}'.format(module_name))
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 return _bootstrap._gcd_import(name[level:], package, level)
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "<frozen importlib._bootstrap_external>", line 940, in exec_module
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/charm/lib/charms/layer/snap.py", line 20, in <module>
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 import tenacity
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 450, in <module>
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 from tenacity._asyncio import AsyncRetrying
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/.venv/lib/python3.11/site-packages/tenacity/_asyncio.py", line 28, in <module>
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 class AsyncRetrying(BaseRetrying):
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/.venv/lib/python3.11/site-packages/tenacity/_asyncio.py", line 36, in AsyncRetrying
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 @asyncio.coroutine
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 ^^^^^^^^^^^^^^^^^
2023-08-15 19:09:33 WARNING unit.ovn-central/1.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
Charm build on master is failing due to jsonschema- >rpds-py- >rust: /launchpadlibra rian.net/ 682124658/ buildlog_ charm_ubuntu_ lunar_ppc64el_ charm-ovn- chassis. master. latest_ BUILDING. txt.gz
https:/
(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 build.tactics: jsonschema
:: charmtools.
Deploying that newly build charm resulted in:
2023-08-15 19:09:33 WARNING unit.ovn- central/ 1.install logger.go:60 Traceback (most recent call last): central/ 1.install logger.go:60 File "/var/lib/ juju/agents/ unit-ovn- central- 1/charm/ hooks/install" , line 8, in <module> central/ 1.install logger.go:60 basic.bootstrap _charm_ deps() central/ 1.install logger.go:60 File "/var/lib/ juju/agents/ unit-ovn- central- 1/charm/ lib/charms/ layer/basic. py", line 123, in bootstrap_ charm_deps central/ 1.install logger.go:60 activate_venv() central/ 1.install logger.go:60 File "/var/lib/ juju/agents/ unit-ovn- central- 1/charm/ lib/charms/ layer/basic. py", line 421, in activate_venv central/ 1.install logger.go:60 layer.import_ layer_libs( ) central/ 1.install logger.go:60 File "/var/lib/ juju/agents/ unit-ovn- central- 1/charm/ lib/charms/ layer/_ _init__ .py", line 24, in import_layer_libs central/ 1.install logger.go:60 import_ module( 'charms. layer.{ }'.format( module_ name)) central/ 1.install logger.go:60 File "/usr/lib/ python3. 11/importlib/ __init_ _.py", line 126, in import_module central/ 1.install logger.go:60 return _bootstrap. _gcd_import( name[level: ], package, level) central/ 1.install logger.go:60 ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ central/ 1.install logger.go:60 File "<frozen importlib. _bootstrap> ", line 1204, in _gcd_import central/ 1.install logger.go:60 File "<frozen importlib. _bootstrap> ", line 1176, in _find_and_load central/ 1.install logger.go:60 File "<frozen importlib. _bootstrap> ", line 1147, in _find_and_ load_unlocked central/ 1.install logger.go:60 File "<frozen importlib. _bootstrap> ", line 690, in _load_unlocked central/ 1.install logger.go:60 File "<frozen importlib. _bootstrap_ external> ", line 940, in exec_module central/ 1.install logger.go:60 File "<frozen importlib. _bootstrap> ", line 241, in _call_with_ frames_ removed central/ 1.install logger.go:60 File "/var/lib/ juju/agents/ unit-ovn- central- 1/charm/ lib/charms/ layer/snap. py", line 20, in <module> central/ 1.install logger.go:60 import tenacity central/ 1.install logger.go:60 File "/var/lib/ juju/agents/ unit-ovn- central- 1/.venv/ lib/python3. 11/site- packages/ tenacity/ __init_ _.py", line 450, in <module> central/ 1.install logger.go:60 from tenacity._asyncio import AsyncRetrying central/ 1.install logger.go:60 File "/var/lib/ juju/agents/ unit-ovn- central- 1/.venv/ lib/python3. 11/site- packages/ tenacity/ _asyncio. py", line 28, in <module> central/ 1.install logger.go:60 class AsyncRetrying( BaseRetrying) : central/ 1.install logger.go:60 File "/var/lib/ juju/agents/ unit-ovn- central- 1/.venv/ lib/python3. 11/site- packages/ tenacity/ _asyncio. py", line 36, in AsyncRetrying central/ 1.install logger.go:60 @asyncio.coroutine central/ 1.install logger.go:60 ^^^^^^^^^^^^^^^^^ central/ 1.install logger.go:60 AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
2023-08-15 19:09:33 WARNING unit.ovn-
Looking back at the charm build, tenacity is pinned by layer snap:
:: charmtools. build.tactics: # layer:snap build.tactics: # Newer versions of tenacity rely on `typing` which is in stdlib in build.tactics: # python3.5 but not python3.4. We want to continue to support build.tactics: # python3.4 (Trusty) build.tactics: tenacity<5.0.4
:: charmtools.
:: charmtools.
:: charmtools.
:: charmtools.
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.