gnocchi charm fails to install Ubuntu 22.04.4

I am attempting to deploy a 3 unit gnocchi cluster, as part of a charmed openstack deployment. Ubuntu 22.04.4 is deployed by MAAS. All machines and services are deploying fine, apart from gnocchi, which gives a failed install hook.

 gnocchi:
    charm: gnocchi
    channel: 2023.2/stable
    revision: 181
    num_units: 3
    to:
    - lxd:0
    - lxd:1
    - lxd:2
...

The LXD containers have internet access OK.

App      Version  Status  Scale  Charm    Channel        Rev  Exposed  Message
gnocchi           error       3  gnocchi  2023.2/stable  181  no       hook failed: "install"

Unit        Workload  Agent  Machine  Public address  Ports  Message
gnocchi/0   error     idle   0/lxd/4  10.10.10.1        hook failed: "install"
gnocchi/1   error     idle   1/lxd/4  10.10.10.2        hook failed: "install"
gnocchi/2*  error     idle   2/lxd/4  10.10.10.3       hook failed: "install"
2024-09-03 12:19:44 INFO juju unit_agent.go:289 Starting unit workers for "gnocchi/0"
2024-09-03 12:19:46 INFO juju.worker.apicaller connect.go:163 [7fda64] "unit-gnocchi-0" successfully connected to "172.19.227.10:17070"
2024-09-03 12:19:47 INFO juju.worker.apicaller connect.go:260 [7fda64] password changed for "unit-gnocchi-0"
2024-09-03 12:19:49 INFO juju.worker.apicaller connect.go:163 [7fda64] "unit-gnocchi-0" successfully connected to "172.19.227.10:17070"
2024-09-03 12:19:51 INFO juju.worker.upgrader upgrader.go:141 no waiter, upgrader is done
2024-09-03 12:19:51 INFO juju.worker.migrationminion worker.go:142 migration phase is now: NONE
2024-09-03 12:19:51 INFO juju.worker.logger logger.go:120 logger worker started
2024-09-03 12:19:52 ERROR juju.worker.meterstatus runner.go:93 error running "meter-status-changed": charm missing from disk
2024-09-03 12:19:54 INFO juju.worker.uniter uniter.go:363 unit "gnocchi/0" started
2024-09-03 12:19:55 INFO juju.worker.uniter uniter.go:689 resuming charm install
2024-09-03 12:19:55 INFO juju.worker.uniter.charm bundles.go:82 downloading ch:amd64/jammy/gnocchi-181 from API server
2024-09-03 12:20:30 INFO juju.worker.uniter uniter.go:389 hooks are retried true
2024-09-03 12:20:49 INFO juju.worker.uniter.storage resolver.go:126 initial storage attachments ready
2024-09-03 12:20:49 INFO juju.worker.uniter resolver.go:185 found queued "install" hook
2024-09-03 12:21:45 WARNING unit.gnocchi/0.install logger.go:60 ERROR: Could not find a version that satisfies the requirement MarkupSafe==2.1.5 (from versions: none)
2024-09-03 12:21:45 WARNING unit.gnocchi/0.install logger.go:60 ERROR: No matching distribution found for MarkupSafe==2.1.5
2024-09-03 12:21:45 WARNING unit.gnocchi/0.install logger.go:60 Traceback (most recent call last):
2024-09-03 12:21:45 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/hooks/install", line 8, in <module>
2024-09-03 12:21:45 WARNING unit.gnocchi/0.install logger.go:60     basic.bootstrap_charm_deps()
2024-09-03 12:21:45 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/lib/charms/layer/basic.py", line 224, in bootstrap_charm_deps
2024-09-03 12:21:45 WARNING unit.gnocchi/0.install logger.go:60     check_call([pip, 'install', '-U', reinstall_flag, '--no-index',
2024-09-03 12:21:45 WARNING unit.gnocchi/0.install logger.go:60   File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
2024-09-03 12:21:45 WARNING unit.gnocchi/0.install logger.go:60     raise CalledProcessError(retcode, cmd)
2024-09-03 12:21:45 WARNING unit.gnocchi/0.install logger.go:60 subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-gnocchi-0/.venv/bin/pip', 'install', '-U', '--force-reinstall', '--no-index', '--no-cache-dir', '-f', 'wheelhouse', 'MarkupSafe==2.1.5', 'wheel==0.43.0']' returned non-zero exit status 1.
2024-09-03 12:21:46 ERROR juju.worker.uniter.operation runhook.go:180 hook "install" (via explicit, bespoke hook script) failed: exit status 1
2024-09-03 12:21:46 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:21:46 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:21:51 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:21:57 WARNING unit.gnocchi/0.install logger.go:60 ERROR: Could not find a version that satisfies the requirement MarkupSafe==2.1.5 (from versions: none)
2024-09-03 12:21:57 WARNING unit.gnocchi/0.install logger.go:60 ERROR: No matching distribution found for MarkupSafe==2.1.5
2024-09-03 12:21:58 WARNING unit.gnocchi/0.install logger.go:60 Traceback (most recent call last):
2024-09-03 12:21:58 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/hooks/install", line 8, in <module>
2024-09-03 12:21:58 WARNING unit.gnocchi/0.install logger.go:60     basic.bootstrap_charm_deps()
2024-09-03 12:21:58 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/lib/charms/layer/basic.py", line 224, in bootstrap_charm_deps
2024-09-03 12:21:58 WARNING unit.gnocchi/0.install logger.go:60     check_call([pip, 'install', '-U', reinstall_flag, '--no-index',
2024-09-03 12:21:58 WARNING unit.gnocchi/0.install logger.go:60   File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
2024-09-03 12:21:58 WARNING unit.gnocchi/0.install logger.go:60     raise CalledProcessError(retcode, cmd)
2024-09-03 12:21:58 WARNING unit.gnocchi/0.install logger.go:60 subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-gnocchi-0/.venv/bin/pip', 'install', '-U', '--force-reinstall', '--no-index', '--no-cache-dir', '-f', 'wheelhouse', 'MarkupSafe==2.1.5', 'wheel==0.43.0']' returned non-zero exit status 1.
2024-09-03 12:21:58 ERROR juju.worker.uniter.operation runhook.go:180 hook "install" (via explicit, bespoke hook script) failed: exit status 1
2024-09-03 12:21:58 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:22:01 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:22:05 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:22:08 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:22:16 WARNING unit.gnocchi/0.install logger.go:60 ERROR: Could not find a version that satisfies the requirement MarkupSafe==2.1.5 (from versions: none)
2024-09-03 12:22:16 WARNING unit.gnocchi/0.install logger.go:60 ERROR: No matching distribution found for MarkupSafe==2.1.5
2024-09-03 12:22:16 WARNING unit.gnocchi/0.install logger.go:60 Traceback (most recent call last):
2024-09-03 12:22:16 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/hooks/install", line 8, in <module>
2024-09-03 12:22:16 WARNING unit.gnocchi/0.install logger.go:60     basic.bootstrap_charm_deps()
2024-09-03 12:22:16 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/lib/charms/layer/basic.py", line 224, in bootstrap_charm_deps
2024-09-03 12:22:16 WARNING unit.gnocchi/0.install logger.go:60     check_call([pip, 'install', '-U', reinstall_flag, '--no-index',
2024-09-03 12:22:16 WARNING unit.gnocchi/0.install logger.go:60   File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
2024-09-03 12:22:16 WARNING unit.gnocchi/0.install logger.go:60     raise CalledProcessError(retcode, cmd)
2024-09-03 12:22:16 WARNING unit.gnocchi/0.install logger.go:60 subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-gnocchi-0/.venv/bin/pip', 'install', '-U', '--force-reinstall', '--no-index', '--no-cache-dir', '-f', 'wheelhouse', 'wheel==0.43.0', 'MarkupSafe==2.1.5']' returned non-zero exit status 1.
2024-09-03 12:22:16 ERROR juju.worker.uniter.operation runhook.go:180 hook "install" (via explicit, bespoke hook script) failed: exit status 1
2024-09-03 12:22:16 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:22:27 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:22:37 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:22:41 WARNING unit.gnocchi/0.install logger.go:60 ERROR: Could not find a version that satisfies the requirement MarkupSafe==2.1.5 (from versions: none)
2024-09-03 12:22:41 WARNING unit.gnocchi/0.install logger.go:60 ERROR: No matching distribution found for MarkupSafe==2.1.5
2024-09-03 12:22:41 WARNING unit.gnocchi/0.install logger.go:60 Traceback (most recent call last):
2024-09-03 12:22:41 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/hooks/install", line 8, in <module>
2024-09-03 12:22:41 WARNING unit.gnocchi/0.install logger.go:60     basic.bootstrap_charm_deps()
2024-09-03 12:22:41 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/lib/charms/layer/basic.py", line 224, in bootstrap_charm_deps
2024-09-03 12:22:41 WARNING unit.gnocchi/0.install logger.go:60     check_call([pip, 'install', '-U', reinstall_flag, '--no-index',
2024-09-03 12:22:41 WARNING unit.gnocchi/0.install logger.go:60   File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
2024-09-03 12:22:41 WARNING unit.gnocchi/0.install logger.go:60     raise CalledProcessError(retcode, cmd)
2024-09-03 12:22:41 WARNING unit.gnocchi/0.install logger.go:60 subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-gnocchi-0/.venv/bin/pip', 'install', '-U', '--force-reinstall', '--no-index', '--no-cache-dir', '-f', 'wheelhouse', 'MarkupSafe==2.1.5', 'wheel==0.43.0']' returned non-zero exit status 1.
2024-09-03 12:22:41 ERROR juju.worker.uniter.operation runhook.go:180 hook "install" (via explicit, bespoke hook script) failed: exit status 1
2024-09-03 12:22:41 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:23:23 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:23:28 WARNING unit.gnocchi/0.install logger.go:60 ERROR: Could not find a version that satisfies the requirement MarkupSafe==2.1.5 (from versions: none)
2024-09-03 12:23:28 WARNING unit.gnocchi/0.install logger.go:60 ERROR: No matching distribution found for MarkupSafe==2.1.5
2024-09-03 12:23:28 WARNING unit.gnocchi/0.install logger.go:60 Traceback (most recent call last):
2024-09-03 12:23:28 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/hooks/install", line 8, in <module>
2024-09-03 12:23:28 WARNING unit.gnocchi/0.install logger.go:60     basic.bootstrap_charm_deps()
2024-09-03 12:23:28 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/lib/charms/layer/basic.py", line 224, in bootstrap_charm_deps
2024-09-03 12:23:28 WARNING unit.gnocchi/0.install logger.go:60     check_call([pip, 'install', '-U', reinstall_flag, '--no-index',
2024-09-03 12:23:28 WARNING unit.gnocchi/0.install logger.go:60   File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
2024-09-03 12:23:28 WARNING unit.gnocchi/0.install logger.go:60     raise CalledProcessError(retcode, cmd)
2024-09-03 12:23:28 WARNING unit.gnocchi/0.install logger.go:60 subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-gnocchi-0/.venv/bin/pip', 'install', '-U', '--force-reinstall', '--no-index', '--no-cache-dir', '-f', 'wheelhouse', 'MarkupSafe==2.1.5', 'wheel==0.43.0']' returned non-zero exit status 1.
2024-09-03 12:23:28 ERROR juju.worker.uniter.operation runhook.go:180 hook "install" (via explicit, bespoke hook script) failed: exit status 1
2024-09-03 12:23:28 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:23:44 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:24:21 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:24:54 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:24:59 WARNING unit.gnocchi/0.install logger.go:60 ERROR: Could not find a version that satisfies the requirement MarkupSafe==2.1.5 (from versions: none)
2024-09-03 12:24:59 WARNING unit.gnocchi/0.install logger.go:60 ERROR: No matching distribution found for MarkupSafe==2.1.5
2024-09-03 12:24:59 WARNING unit.gnocchi/0.install logger.go:60 Traceback (most recent call last):
2024-09-03 12:24:59 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/hooks/install", line 8, in <module>
2024-09-03 12:24:59 WARNING unit.gnocchi/0.install logger.go:60     basic.bootstrap_charm_deps()
2024-09-03 12:24:59 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/lib/charms/layer/basic.py", line 224, in bootstrap_charm_deps
2024-09-03 12:24:59 WARNING unit.gnocchi/0.install logger.go:60     check_call([pip, 'install', '-U', reinstall_flag, '--no-index',
2024-09-03 12:24:59 WARNING unit.gnocchi/0.install logger.go:60   File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
2024-09-03 12:24:59 WARNING unit.gnocchi/0.install logger.go:60     raise CalledProcessError(retcode, cmd)
2024-09-03 12:24:59 WARNING unit.gnocchi/0.install logger.go:60 subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-gnocchi-0/.venv/bin/pip', 'install', '-U', '--force-reinstall', '--no-index', '--no-cache-dir', '-f', 'wheelhouse', 'wheel==0.43.0', 'MarkupSafe==2.1.5']' returned non-zero exit status 1.
2024-09-03 12:24:59 ERROR juju.worker.uniter.operation runhook.go:180 hook "install" (via explicit, bespoke hook script) failed: exit status 1
2024-09-03 12:24:59 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:26:20 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:27:52 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:27:57 WARNING unit.gnocchi/0.install logger.go:60 ERROR: Could not find a version that satisfies the requirement MarkupSafe==2.1.5 (from versions: none)
2024-09-03 12:27:57 WARNING unit.gnocchi/0.install logger.go:60 ERROR: No matching distribution found for MarkupSafe==2.1.5
2024-09-03 12:27:57 WARNING unit.gnocchi/0.install logger.go:60 Traceback (most recent call last):
2024-09-03 12:27:57 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/hooks/install", line 8, in <module>
2024-09-03 12:27:57 WARNING unit.gnocchi/0.install logger.go:60     basic.bootstrap_charm_deps()
2024-09-03 12:27:57 WARNING unit.gnocchi/0.install logger.go:60   File "/var/lib/juju/agents/unit-gnocchi-0/charm/lib/charms/layer/basic.py", line 224, in bootstrap_charm_deps
2024-09-03 12:27:57 WARNING unit.gnocchi/0.install logger.go:60     check_call([pip, 'install', '-U', reinstall_flag, '--no-index',
2024-09-03 12:27:57 WARNING unit.gnocchi/0.install logger.go:60   File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
2024-09-03 12:27:57 WARNING unit.gnocchi/0.install logger.go:60     raise CalledProcessError(retcode, cmd)
2024-09-03 12:27:57 WARNING unit.gnocchi/0.install logger.go:60 subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-gnocchi-0/.venv/bin/pip', 'install', '-U', '--force-reinstall', '--no-index', '--no-cache-dir', '-f', 'wheelhouse', 'wheel==0.43.0', 'MarkupSafe==2.1.5']' returned non-zero exit status 1.
2024-09-03 12:27:57 ERROR juju.worker.uniter.operation runhook.go:180 hook "install" (via explicit, bespoke hook script) failed: exit status 1
2024-09-03 12:27:57 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:31:56 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook
2024-09-03 12:32:57 INFO juju.worker.uniter resolver.go:180 awaiting error resolution for "install" hook

Replying to my own post. Removed the specific revision, so it got the latest and seems to install fine now.