Charms are not expected to have internet access on install therefore they should package all the required wheels as part of the charm. Not doing so will lead to failures like below:
unit-openstack-service-checks-0: 11:16:50 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[] map[keystone:52] []}}
unit-openstack-service-checks-0: 11:16:50 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[keystone/0:{52}] map[] []}}
unit-openstack-service-checks-0: 11:17:08 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[] map[keystone:53] []}}
unit-openstack-service-checks-0: 11:17:08 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[keystone/0:{53}] map[] []}}
unit-openstack-service-checks-0: 11:17:18 WARNING unit.openstack-service-checks/0.install WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f45218bdcd0>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/openstacksdk/
unit-openstack-service-checks-0: 11:17:23 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[] map[keystone:54] []}}
unit-openstack-service-checks-0: 11:17:23 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[keystone/0:{54}] map[] []}}
unit-openstack-service-checks-0: 11:17:42 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[keystone/0:{55}] map[keystone:55] []}}
unit-openstack-service-checks-0: 11:17:57 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[] map[keystone:56] []}}
unit-openstack-service-checks-0: 11:17:57 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[keystone/0:{56}] map[] []}}
unit-openstack-service-checks-0: 11:18:14 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[] map[keystone:57] []}}
unit-openstack-service-checks-0: 11:18:14 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[keystone/0:{57}] map[] []}}
unit-openstack-service-checks-0: 11:18:20 WARNING unit.openstack-service-checks/0.install WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f4521bb1760>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/openstacksdk/
unit-openstack-service-checks-0: 11:18:28 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[] map[keystone:58] []}}
unit-openstack-service-checks-0: 11:18:28 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[keystone/0:{58}] map[] []}}
unit-openstack-service-checks-0: 11:18:48 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[] map[keystone:59] []}}
unit-openstack-service-checks-0: 11:18:48 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[keystone/0:{59}] map[] []}}
unit-openstack-service-checks-0: 11:19:24 WARNING unit.openstack-service-checks/0.install WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f4521bb1c40>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/openstacksdk/
unit-openstack-service-checks-0: 11:19:26 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[keystone/0:{60}] map[keystone:60] []}}
unit-openstack-service-checks-0: 11:19:41 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[keystone/0:{61}] map[keystone:61] []}}
unit-openstack-service-checks-0: 11:19:55 DEBUG juju.worker.uniter.remotestate got a relation units change for openstack-service-checks/0 : {277 {map[keystone/0:{62}] map[keystone:62] []}}
unit-openstack-service-checks-0: 11:20:24 WARNING unit.openstack-service-checks/0.install ERROR: Could not find a version that satisfies the requirement openstacksdk>=0.56.0 (from versions: none)
unit-openstack-service-checks-0: 11:20:24 WARNING unit.openstack-service-checks/0.install ERROR: No matching distribution found for openstacksdk>=0.56.0
unit-openstack-service-checks-0: 11:20:24 WARNING unit.openstack-service-checks/0.install Traceback (most recent call last):
unit-openstack-service-checks-0: 11:20:24 WARNING unit.openstack-service-checks/0.install File "/var/lib/juju/agents/unit-openstack-service-checks-0/charm/hooks/install", line 8, in <module>
unit-openstack-service-checks-0: 11:20:24 WARNING unit.openstack-service-checks/0.install basic.bootstrap_charm_deps()
unit-openstack-service-checks-0: 11:20:24 WARNING unit.openstack-service-checks/0.install File "/var/lib/juju/agents/unit-openstack-service-checks-0/charm/lib/charms/layer/basic.py", line 227, in bootstrap_charm_deps
unit-openstack-service-checks-0: 11:20:24 WARNING unit.openstack-service-checks/0.install check_call([pip, 'install', '-U'] + cfg.get('python_packages'),
unit-openstack-service-checks-0: 11:20:24 WARNING unit.openstack-service-checks/0.install File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
unit-openstack-service-checks-0: 11:20:24 WARNING unit.openstack-service-checks/0.install raise CalledProcessError(retcode, cmd)
unit-openstack-service-checks-0: 11:20:24 WARNING unit.openstack-service-checks/0.install subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-openstack-service-checks-0/.venv/bin/pip', 'install', '-U', 'openstacksdk>=0.56.0', 'cryptography>=2.7.0,<3.3']' returned non-zero exit status 1.
unit-openstack-service-checks-0: 11:20:25 ERROR juju.worker.uniter.operation hook "install" (via explicit, bespoke hook script) failed: exit status 1
unit-openstack-service-checks-0: 11:20:25 DEBUG juju.machinelock created rotating log file "/var/log/juju/machine-lock.log" with max size 10 MB and max backups 5
unit-openstack-service-checks-0: 11:20:25 DEBUG juju.machinelock machine lock released for openstack-service-checks/0 uniter (run install hook)
unit-openstack-service-checks-0: 11:20:25 DEBUG juju.worker.uniter.operation lock released for openstack-service-checks/0
unit-openstack-service-checks-0: 11:20:25 INFO juju.worker.uniter awaiting error resolution for "install" hook
unit-openstack-service-checks-0: 11:20:25 DEBUG juju.worker.uniter [AGENT-STATUS] error: hook failed: "install"
Charms are not expected to have internet access on install therefore they should package all the required wheels as part of the charm. Not doing so will lead to failures like below:
Imported from Launchpad using lp2gh.
date created: 2022-04-28T15:20:48Z
owner: moisesbenzan
assignee: None
the launchpad url