KeyError on "labels" when metadata does not have the labels attribute in k8s yml file
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
Trunk |
Fix Committed
|
High
|
Vedamurthy Joshi |
Bug Description
R4.0 3028
In the below example, metadata does not have labels attribute
----
Such a pod would not get the IP, and we see the below keyError
root@vedu-vm1-1:/# tail -f /var/log/
Traceback (most recent call last):
File "/usr/lib/
result = self._run(
File "/usr/lib/
self.
File "/usr/lib/
labels = event['
KeyError: 'labels'
---------
[root@vedu-vm1-1 centos]# cat busybox.yaml
apiVersion: v1
kind: Pod
metadata:
name: busybox
namespace: default
spec:
containers:
- image: busybox
command:
- sleep
- "3600"
imagePullPo
name: busybox
restartPolicy: Always
[root@vedu-vm1-1 centos]#
tags: | added: contrail-kube-manager |
Review in progress for https:/ /review. opencontrail. org/28209
Submitter: Vedamurthy Joshi (<email address hidden>)