Calico charm version: amd64/jammy/calico-110
Looks like an uncaught error which would indicate the charm is waiting for an active api server -- yields an charm error instead that should likely be caught and hanled
2024-07-29 00:55:58 ERROR unit.calico/1.juju-log server.go:325 Uncaught exception while in charm code:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-calico-1/charm/./src/charm.py", line 664, in <module>
ops.main(CalicoCharm)
File "/var/lib/juju/agents/unit-calico-1/charm/venv/ops/main.py", line 563, in __call__
return main(charm_class, use_juju_for_storage=use_juju_for_storage)
File "/var/lib/juju/agents/unit-calico-1/charm/venv/ops/main.py", line 551, in main
manager.run()
File "/var/lib/juju/agents/unit-calico-1/charm/venv/ops/main.py", line 530, in run
self._emit()
File "/var/lib/juju/agents/unit-calico-1/charm/venv/ops/main.py", line 516, in _emit
self.framework.reemit()
File "/var/lib/juju/agents/unit-calico-1/charm/venv/ops/framework.py", line 870, in reemit
self._reemit()
File "/var/lib/juju/agents/unit-calico-1/charm/venv/ops/framework.py", line 950, in _reemit
custom_handler(event)
File "/var/lib/juju/agents/unit-calico-1/charm/./src/charm.py", line 141, in _on_install
self._install_or_upgrade(event)
File "/var/lib/juju/agents/unit-calico-1/charm/./src/charm.py", line 176, in _install_or_upgrade
self._set_status()
File "/var/lib/juju/agents/unit-calico-1/charm/./src/charm.py", line 204, in _set_status
if unready := self.collector.unready:
File "/var/lib/juju/agents/unit-calico-1/charm/venv/ops/manifests/collector.py", line 92, in unready
for name, obj, cond in self.all_conditions
File "/var/lib/juju/agents/unit-calico-1/charm/venv/ops/manifests/collector.py", line 120, in all_conditions
return [
File "/var/lib/juju/agents/unit-calico-1/charm/venv/ops/manifests/collector.py", line 123, in <listcomp>
for obj in manifest.status()
File "/var/lib/juju/agents/unit-calico-1/charm/src/calico_manifests.py", line 395, in status
log_events(collect_events(self.client, obj.resource))
File "/var/lib/juju/agents/unit-calico-1/charm/src/calico_manifests.py", line 441, in collect_events
object_events += [event for pod in involved_pods for event in collect_events(client, pod)]
File "/var/lib/juju/agents/unit-calico-1/charm/src/calico_manifests.py", line 441, in <listcomp>
object_events += [event for pod in involved_pods for event in collect_events(client, pod)]
File "/var/lib/juju/agents/unit-calico-1/charm/src/calico_manifests.py", line 427, in collect_events
object_events = list(
File "/var/lib/juju/agents/unit-calico-1/charm/venv/lightkube/core/generic_client.py", line 252, in list
cont, chunk = self.handle_response('list', resp, br)
File "/var/lib/juju/agents/unit-calico-1/charm/venv/lightkube/core/generic_client.py", line 196, in handle_response
self.raise_for_status(resp)
File "/var/lib/juju/agents/unit-calico-1/charm/venv/lightkube/core/generic_client.py", line 190, in raise_for_status
raise transform_exception(e)
File "/var/lib/juju/agents/unit-calico-1/charm/venv/lightkube/core/generic_client.py", line 188, in raise_for_status
resp.raise_for_status()
File "/var/lib/juju/agents/unit-calico-1/charm/venv/httpx/_models.py", line 761, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Server error '502 Bad Gateway' for url 'https://10.246.153.187/api/v1/namespaces/kube-system/events?fieldSelector=involvedObject.kind%3DPod%2CinvolvedObject.name%3Dcalico-node-6jz7n'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502
2024-07-29 00:55:58 ERROR juju.worker.uniter.operation runhook.go:180 hook "update-status" (via hook dispatching script: dispatch) failed: exit status 1
https:/ /github. com/charmed- kubernetes/ charm-calico/ pull/112