Closed jneo8 closed 2 months ago
On arm64 github runner, lxd cloud, the grafana-agent failed on install hook.
The error messages:
unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install Traceback (most recent call last): unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install File "/var/lib/juju/agents/unit-grafana-agent-0/charm/lib/charms/observability_libs/v0/cert_handler.py", line 43, in <module> unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install from charms.tls_certificates_interface.v2.tls_certificates import ( # type: ignore unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install File "/var/lib/juju/agents/unit-grafana-agent-0/charm/lib/charms/tls_certificates_interface/v2/tls_certificates.py", line 284, in <module> unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install from cryptography import x509 unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install File "/var/lib/juju/agents/unit-grafana-agent-0/charm/venv/cryptography/x509/__init__.py", line 7, in <module> unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install from cryptography.x509 import certificate_transparency, verification unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install File "/var/lib/juju/agents/unit-grafana-agent-0/charm/venv/cryptography/x509/certificate_transparency.py", line 11, in <module> unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install from cryptography.hazmat.bindings._rust import x509 as rust_x509 unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install ImportError: cannot import name 'x509' from 'cryptography.hazmat.bindings._rust' (unknown location) unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install The above exception was the direct cause of the following exception: unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install Traceback (most recent call last): unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install File "/var/lib/juju/agents/unit-grafana-agent-0/charm/./src/charm.py", line 21, in <module> unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install from grafana_agent import METRICS_RULES_SRC_PATH, GrafanaAgentCharm unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install File "/var/lib/juju/agents/unit-grafana-agent-0/charm/src/grafana_agent.py", line 31, in <module> unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install from charms.observability_libs.v0.cert_handler import CertHandler unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install File "/var/lib/juju/agents/unit-grafana-agent-0/charm/lib/charms/observability_libs/v0/cert_handler.py", line 53, in <module> unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install raise ImportError( unit-grafana-agent-0: 2024-09-16 04:43:17 WARNING unit.grafana-agent/0.install ImportError: failed to import charms.tls_certificates_interface.v2.tls_certificates; Either the library itself is missing (please get it through charmcraft fetch-lib) or one of its dependencies is unmet.
bundle yaml:
machines: "0": constraints: arch=arm64 applications: ubuntu: charm: ubuntu num_units: 1 to: - "0" constraints: arch=arm64 series: jammy grafana-agent: charm: grafana-agent channel: stable revision: 219 relations: - - grafana-agent:juju-info - ubuntu:juju-info
On github CI: https://github.com/canonical/hardware-observer-operator/actions/runs/10877573905/job/30179147343?pr=312
The crashdump logs can be download on https://github.com/canonical/hardware-observer-operator/actions/runs/10877573905/artifacts/1935875445
No response
In the end it's the bug on juju to choose the correct revision for subordinate on different architecture. Sorry for the confusion.
See: https://bugs.launchpad.net/juju/+bug/2067749
Bug Description
On arm64 github runner, lxd cloud, the grafana-agent failed on install hook.
The error messages:
To Reproduce
bundle yaml:
Environment
On github CI: https://github.com/canonical/hardware-observer-operator/actions/runs/10877573905/job/30179147343?pr=312
Relevant log output
The crashdump logs can be download on https://github.com/canonical/hardware-observer-operator/actions/runs/10877573905/artifacts/1935875445
Additional context
No response