cni manage_flags fails if no cni relations are present
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Kubernetes Control Plane Charm |
Fix Released
|
Undecided
|
Kevin W Monroe | ||
Kubernetes Worker Charm |
Fix Released
|
Undecided
|
Kevin W Monroe |
Bug Description
We use goal-state to determine configuration for related CNI endpoints in interface-
If no cni relations have been specified, we'll get a key error. We don't typically hit this because we deploy with bundles, which set up required relations at deploy time. However, deploying a k8s-[master|worker] charm by itself will fail. Repro:
juju deploy ~containers/
When manage_flags runs for the cni relation, we'll hit this:
...
unit-kmb-0: 10:42:35 INFO unit.kmb/0.juju-log Reactive main running for hook install
unit-kmb-0: 10:42:35 ERROR unit.kmb/0.juju-log Hook error:
Traceback (most recent call last):
File "/var/lib/
hookenv.
File "/var/lib/
callback(*args, **kwargs)
File "/var/lib/
endpoint.
File "/var/lib/
self.
File "/var/lib/
self.
File "/var/lib/
name for name in goal_state[
KeyError: 'cni'
...
description: | updated |
Changed in charm-kubernetes-master: | |
assignee: | nobody → Kevin W Monroe (kwmonroe) |
Changed in charm-kubernetes-master: | |
status: | New → In Progress |
description: | updated |
summary: |
- cni manage_flags fails if no goal-state relations are present + cni manage_flags fails if no cni relations are present |
Changed in charm-kubernetes-master: | |
status: | In Progress → Fix Committed |
Changed in charm-kubernetes-worker: | |
status: | In Progress → Fix Committed |
tags: | removed: review-needed |
Changed in charm-kubernetes-master: | |
milestone: | none → 1.19 |
Changed in charm-kubernetes-worker: | |
milestone: | none → 1.19 |
Changed in charm-kubernetes-master: | |
milestone: | 1.19 → 1.18+ck1 |
Changed in charm-kubernetes-worker: | |
milestone: | 1.19 → 1.18+ck1 |
Changed in charm-kubernetes-master: | |
status: | Fix Committed → Fix Released |
Changed in charm-kubernetes-worker: | |
status: | Fix Committed → Fix Released |
This is fixed in interface- kubernetes- cni with the following:
https:/ /github. com/juju- solutions/ interface- kubernetes- cni/pull/ 8