Closed sed-i closed 1 year ago
Same itest fails with juju 3.0.2-8bf53dc, agent 3.0.2.
tests/integration/test_grafana_dashboards.py::test_build_and_deploy
----------------------------------------------------------------------------------- live log setup ------------------------------------------------------------------------------------
WARNING juju.client.connection:connection.py:891 unknown common facade version for AllModelWatcher
WARNING juju.client.connection:connection.py:891 unknown common facade version for ApplicationOffers
WARNING juju.client.connection:connection.py:891 unknown common facade version for Cloud
WARNING juju.client.connection:connection.py:891 unknown common facade version for Controller
WARNING juju.client.connection:connection.py:891 unknown common facade version for ModelConfig
WARNING juju.client.connection:connection.py:891 unknown common facade version for ModelManager
WARNING juju.client.connection:connection.py:891 unknown common facade version for UserManager
ERROR
tests/integration/test_grafana_dashboards.py::test_relating_to_grafana ERROR
tests/integration/test_grafana_dashboards.py::test_dashboard_files_ingested_by_grafana ERROR
======================================================================================= ERRORS ========================================================================================
_______________________________________________________________________ ERROR at setup of test_build_and_deploy _______________________________________________________________________
Traceback (most recent call last):
File "/home/ubuntu/code/cos-configuration-k8s-operator/.tox/integration/lib/python3.10/site-packages/pytest_asyncio/plugin.py", line 301, in _asyncgen_fixture_wrapper
result = event_loop.run_until_complete(setup())
File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/home/ubuntu/code/cos-configuration-k8s-operator/.tox/integration/lib/python3.10/site-packages/pytest_asyncio/plugin.py", line 283, in setup
res = await gen_obj.__anext__()
File "/home/ubuntu/code/cos-configuration-k8s-operator/.tox/integration/lib/python3.10/site-packages/pytest_operator/plugin.py", line 231, in ops_test
await ops_test._setup_model()
File "/home/ubuntu/code/cos-configuration-k8s-operator/.tox/integration/lib/python3.10/site-packages/pytest_operator/plugin.py", line 686, in _setup_model
await self._controller.connect(self.controller_name)
File "/home/ubuntu/code/cos-configuration-k8s-operator/.tox/integration/lib/python3.10/site-packages/juju/controller.py", line 136, in connect
await self.update_endpoints()
File "/home/ubuntu/code/cos-configuration-k8s-operator/.tox/integration/lib/python3.10/site-packages/juju/controller.py", line 139, in update_endpoints
info = await self.info()
File "/home/ubuntu/code/cos-configuration-k8s-operator/.tox/integration/lib/python3.10/site-packages/juju/controller.py", line 280, in info
uuids = await self.model_uuids()
File "/home/ubuntu/code/cos-configuration-k8s-operator/.tox/integration/lib/python3.10/site-packages/juju/controller.py", line 543, in model_uuids
facade = client.ModelManagerFacade.from_connection(
File "/home/ubuntu/code/cos-configuration-k8s-operator/.tox/integration/lib/python3.10/site-packages/juju/client/_client.py", line 66, in from_connection
raise Exception('No facade {} in facades {}'.format(facade_name,
Exception: No facade ModelManager in facades {'Bundle': 6, 'CrossController': 1, 'HighAvailability': 2, 'MigrationTarget': 1, 'ModelSummaryWatcher': 1, 'ModelUpgrader': 1, 'NotifyWatcher': 1, 'Pinger': 1}
For curiosity, what's the value of the agent-version
field in the controllers file (~/.local/share/juju/controllers.yaml
)?
Tests work fine with juju 2.9.37, agent version 2.9.34, pylibjuju 2.9.10.
For that experiment I had
$ cat ~/.local/share/juju/controllers.yaml | yq '.controllers.chdv2934.agent-version'
2.9.34
Pylibjuju 3.0.4 tries to address both 2.9.x and 3.0.x juju facades. Unfortunately, this seems to skip the existing compatibility. Said that, pylibjuju 3.1.0 will no longer support 2.9.x facades. This means that a 2.9.x agent will have to be targeted using the latest 2.9.x version of pylibjuju.
I will close this issue as there is a workaround for it. Feel free to reopen it.
Description
Integration test fails with a facade error. Pinning
juju == 2.9.10
works (still fails later forOSError: [Errno 9] Bad file descriptor
but that's a different story).Urgency
Annoying bug in our test suite
Python-libjuju version
3.0.4
Juju version
juju 2.9.37 with agent version 2.9.29
Reproduce / Test