configuring default storage can results in charm error

Bug #2015394 reported by Adam Dyess
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kubernetes Control Plane Charm
Fix Released
Critical
Adam Dyess

Bug Description

Round on 1.27/edge build

reference of a key which doesn't exist in apply_default_storage

Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-kubernetes-control-plane-0/.venv/lib/python3.10/site-packages/charms/reactive/__init__.py", line 74, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-kubernetes-control-plane-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 390, in dispatch
    _invoke(other_handlers)
  File "/var/lib/juju/agents/unit-kubernetes-control-plane-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 359, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-kubernetes-control-plane-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 181, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-kubernetes-control-plane-0/charm/reactive/kubernetes_control_plane.py", line 1708, in configure_cdk_addons
    default_storage = configure_default_storage_class()
  File "/var/lib/juju/agents/unit-kubernetes-control-plane-0/charm/reactive/kubernetes_control_plane.py", line 1675, in configure_default_storage_class
    apply_default_storage(storage_class, def_storage_class)
  File "/var/lib/juju/agents/unit-kubernetes-control-plane-0/charm/reactive/kubernetes_control_plane.py", line 1642, in apply_default_storage
    new_annotations = storage_class["metadata"]["annotations"].copy()
KeyError: 'annotations'

Revision history for this message
Adam Dyess (addyess) wrote :
Changed in charm-kubernetes-master:
milestone: none → 1.27
assignee: nobody → Adam Dyess (addyess)
importance: Undecided → Critical
status: New → Confirmed
status: Confirmed → In Progress
Adam Dyess (addyess)
Changed in charm-kubernetes-master:
status: In Progress → Fix Committed
Changed in charm-kubernetes-master:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.