"blocked" state "Missing cni resource" gets overridden with "active/idle" state
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Kubernetes Worker Charm |
Triaged
|
Medium
|
Unassigned |
Bug Description
When you deploy kubernetes-worker charm from source and you forget to manually include it's resources, it should end up in blocked state with message "Missing cni resource.". It does happen, but then it's immediately replaced with `active/idle` state and message "Kubernetes worker running.".
Here's output of the `juju show-status-log`:
11 Jan 2021 10:06:38Z workload active Kubernetes worker running.
11 Jan 2021 10:06:39Z juju-unit idle
11 Jan 2021 10:10:30Z workload blocked Missing cni resource.
11 Jan 2021 10:10:31Z workload active Kubernetes worker running.
11 Jan 2021 10:12:43Z workload blocked Missing cni resource.
11 Jan 2021 10:12:45Z workload active Kubernetes worker running.
11 Jan 2021 10:18:00Z workload blocked Missing cni resource.
11 Jan 2021 10:18:02Z workload active Kubernetes worker running.
My guess is that `@hookenv.atexit` decorated function `charm_status()` in `reactive/
Yep, either the "Missing cni resource." status_set[1] needs to be moved into the atexit charm_status handler[2], or this charm needs to be updated to use layer-status[3].
[1]: https:/ /github. com/charmed- kubernetes/ charm-kubernete s-worker/ blob/47d6461ef6 ffecc545197aaa1 7ad9cb7331fc5f3 /reactive/ kubernetes_ worker. py#L375 /github. com/charmed- kubernetes/ charm-kubernete s-worker/ blob/47d6461ef6 ffecc545197aaa1 7ad9cb7331fc5f3 /reactive/ kubernetes_ worker. py#L409 /github. com/juju- solutions/ layer-status
[2]: https:/
[3]: https:/