no flannel binaries after recreating relation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Flannel Charm |
Fix Released
|
Medium
|
Jorge Niedbalski |
Bug Description
[Description]
When the juju relation between flannel and kubernetes-worker gets removed,
the new pods won't start.
[Reproducer]
1) Deploy the following bundle (http://
2) Create a pod as follows
$ cat busybox.yaml
apiVersion: v1
kind: Pod
metadata:
name: busybox-default
namespace: default
labels:
app: busybox
spec:
containers:
- image: busybox
imagePullPo
name: busybox-default
command:
- sleep
- "36000"
$ kubectl create -f busybox.yaml
2.1) Check kubectl pod status as running
$ kubectl get po
3) Remove the flannel -> kubernetes-worker relation
$ juju remove-relation kubernetes-worker flannel
4) Re-add the flannel kubernetes-worker relation
$ juju add-relation kuberentes-worker flannel
5) Check that pod status remains as creating
$ kubectl get po
busybox-default 0/1 ContainerCreating 0 3m14s
6) Check current pod description
$ kubectl describe po
Normal Scheduled 13m default-scheduler Successfully assigned default/
Warning FailedCreatePod
Warning FailedCreatePod
Warning FailedCreatePod
Warning FailedCreatePod
Warning FailedCreatePod
Warning FailedCreatePod
Warning FailedCreatePod
Warning FailedCreatePod
Warning FailedCreatePod
Warning FailedCreatePod
[Expected behavior]
New pods are in running state after re-adding the relation.
[Suggested solution]
The 'stop' cleanup_deployment method should clear the installed
state (https:/
Changed in charm-flannel: | |
assignee: | nobody → Jorge Niedbalski (niedbalski) |
Changed in charm-flannel: | |
importance: | Undecided → High |
status: | Confirmed → Triaged |
Changed in charm-flannel: | |
importance: | High → Medium |
Changed in charm-flannel: | |
milestone: | none → 1.19+ck1 |
Changed in charm-flannel: | |
status: | Triaged → Fix Committed |
tags: | removed: review-needed |
tags: | added: backport-needed |
tags: | removed: backport-needed |
Changed in charm-flannel: | |
status: | Fix Committed → Fix Released |
Looks like the flannel charm is removing files from /opt/cni/bin/ during its stop hook: https:/ /github. com/charmed- kubernetes/ charm-flannel/ blob/f79f180a4f 8c3f19652f77596 537cd9ca359b402 /reactive/ flannel. py#L312- L314
It shouldn't do that. Those files are installed by kubernetes-worker, not by flannel. And kubernetes-worker doesn't know it's happening, so those files never get re-installed when the new flannel subordinate is deployed.
I think if we remove those three lines, that should fix the issue.