kube-dns pod not operationally present in agent
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R4.0 |
Fix Committed
|
High
|
Praveen | |||
Trunk |
Fix Committed
|
High
|
Praveen |
Bug Description
R4.0 Build 14 Ubuntu 16.04.2 Container setup
While working with the k8s cluster, it so happened that agent did not the vmi of kube-dns vm object. Agent ifmap db had the VM details, but operationally, it was not up.
From the cni logs, it looks like the vmi for the pod was deleted altogether
root@nodec1:~# kubectl describe pod kube-dns --namespace=
Name: kube-dns-
Namespace: kube-system
Node: nodek1/
Start Time: Mon, 29 May 2017 15:03:43 +0530
Labels: k8s-app=kube-dns
pod-template-
Annotations: kubernetes.
scheduler.
Status: Running
IP:
Controllers: ReplicaSet/
Containers:
kubedns:
Container ID: docker:
Image: gcr.io/
Image ID: docker-
Ports: 10053/UDP, 10053/TCP, 10055/TCP
Args:
-
-
-
--v=2
State: Running
Started: Mon, 29 May 2017 15:40:27 +0530
Ready: True
Restart Count: 0
Limits:
memory: 170Mi
Requests:
cpu: 100m
memory: 70Mi
Liveness: exec [ping -c 1 127.0.0.1] delay=0s timeout=1s period=10s #success=1 #failure=3
Readiness: exec [ping -c 1 127.0.0.1] delay=0s timeout=1s period=10s #success=1 #failure=3
Environment:
PROMETHEU
Mounts:
/
/
dnsmasq:
Container ID: docker:
Image: gcr.io/
Image ID: docker-
Ports: 53/UDP, 53/TCP
Args:
-v=2
-logtostderr
-
-
--
-k
-
-
-
-
-
State: Running
Started: Mon, 29 May 2017 15:40:36 +0530
Ready: True
Restart Count: 0
Requests:
cpu: 150m
memory: 20Mi
Liveness: exec [ping -c 1 127.0.0.1] delay=0s timeout=1s period=10s #success=1 #failure=3
Readiness: exec [ping -c 1 127.0.0.1] delay=0s timeout=1s period=10s #success=1 #failure=3
Environment: <none>
Mounts:
/
/
sidecar:
Container ID: docker:
Image: gcr.io/
Image ID: docker-
Port: 10054/TCP
Args:
--v=2
--logtostderr
-
-
State: Running
Started: Mon, 29 May 2017 15:40:44 +0530
Ready: True
Restart Count: 0
Requests:
cpu: 10m
memory: 20Mi
Liveness: exec [ls] delay=0s timeout=1s period=10s #success=1 #failure=3
Readiness: exec [ls] delay=0s timeout=1s period=10s #success=1 #failure=3
Environment: <none>
Mounts:
/
Conditions:
Type Status
Initialized True
Ready True
PodScheduled True
Volumes:
kube-dns-config:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: kube-dns
Optional: true
kube-
Type: Secret (a volume populated by a Secret)
SecretName: kube-dns-
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node.alpha.
node.
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
1h 46m 27 kubelet, nodek1 Warning FailedSync Error syncing pod, skipping: failed to "CreatePodSandbox" for "kube-dns-
1h 46m 27 kubelet, nodek1 Normal SandboxChanged Pod sandbox changed, it will be killed and re-created.
46m 46m 1 kubelet, nodek1 spec.containers
46m 46m 1 kubelet, nodek1 spec.containers
46m 46m 1 kubelet, nodek1 spec.containers
46m 46m 1 kubelet, nodek1 spec.containers
46m 46m 1 kubelet, nodek1 spec.containers
45m 45m 1 kubelet, nodek1 spec.containers
45m 45m 1 kubelet, nodek1 spec.containers
45m 45m 1 kubelet, nodek1 spec.containers
45m 45m 1 kubelet, nodek1 spec.containers
45m 45m 1 kubelet, nodek1 spec.containers
45m 45m 1 kubelet, nodek1 spec.containers
45m 45m 1 kubelet, nodek1 spec.containers
root@nodec1:~#
cni log:
I : 7706 : 2017/05/29 15:05:02 cni.go:90: &{cniArgs:
I : 7706 : 2017/05/29 15:05:02 vrouter.go:384: {Server:127.0.0.1 Port:9091 Dir:/var/
I : 7706 : 2017/05/29 15:05:02 veth.go:161: {CniIntf:
I : 7706 : 2017/05/29 15:05:02 veth.go:33: Deleting VEth interface {CniIntf:
I : 7706 : 2017/05/29 15:05:02 interface.go:49: Deleting interface tap6dc66b31-44
I : 7706 : 2017/05/29 15:05:02 interface.go:53: Interface tap6dc66b31-44 not present. Error Link not found
E : 7706 : 2017/05/29 15:05:02 veth.go:41: Deleted interface
I : 7706 : 2017/05/29 15:05:02 cni.go:206: Deleted interface eth0 inside container
I : 7706 : 2017/05/29 15:05:02 vrouter.go:339: Deleting container : 6dc66b31-
I : 7706 : 2017/05/29 15:05:02 vrouter.go:299: File /var/lib/
I : 7706 : 2017/05/29 15:05:02 vrouter.go:78: VRouter request. Operation : DELETE Url : http://
tags: | added: blocker |
CNI creates tap interface based on UUID for "pause" container. This creates problem in following sequence of container create/destroy for same dns-pod (UUID bf84d6- 442c-11e7- 96b4-002590c30a f2),
I : 14981 : 2017/05/29 15:38:47 contrail- kube-cni. go:52: Came in Add for container 1e7accb7c7fe962 790737fe437f82b 6ea8b2206330228 55a97a9710e0546 3a6b
>>> This Add operation fails since agent does not have configuration yet. It creates tap interface tap6ebf84d6-44
I : 15267 : 2017/05/29 15:40:05 contrail- kube-cni. go:52: Came in Add for container 1107ef3bd6b8a05 ec3aff23d07da08 7bf4c8fb02727b2 d0ad7ac5f190330 dc36
>>> This Add operation succeeds since agent has got configuration by this time. This container also uses tap name tap6ebf84d6-44
I : 16128 : 2017/05/29 15:41:02 contrail- kube-cni. go:82: Came in Del for container 1e7accb7c7fe962 790737fe437f82b 6ea8b2206330228 55a97a9710e0546 3a6b
>>> This Del operation removes the tap interface tap6ebf84d6-44. This results in deletion of tap interface for container-id 1107ef3bd6b8a05 ec3aff23d07da08 7bf4c8fb02727b2 d0ad7ac5f190330 dc36
Solution: digits- of-container- id><6-lower- digit-of- container- id>
Create tap interface based on container-id instead of UUID. Tap interface name format will be,
tap<6-upper-