Use the right variable in debug message

This gives a more meaningful log message

Change-Id: Iad7a60caca67350cb0b7ae365a1b5f5c76ce512a
Signed-off-by: Nayan Deshmukh <n.deshmukh@samsung.com>
This commit is contained in:
Nayan Deshmukh 2020-03-26 13:34:44 +09:00
parent afc0b49671
commit 358886022a
1 changed files with 4 additions and 2 deletions

View File

@ -237,9 +237,11 @@ class VIFHandler(k8s_base.ResourceEventHandler):
def _set_pod_state(self, pod, state):
# TODO(ivc): extract annotation interactions
if not state:
old_annotation = pod['metadata'].get('annotations', {})
LOG.debug("Removing VIFs annotation: %r for pod %s/%s (uid: %s)",
state, pod['metadata']['namespace'],
pod['metadata']['name'], pod['metadata']['uid'])
old_annotation.get(constants.K8S_ANNOTATION_VIF),
pod['metadata']['namespace'], pod['metadata']['name'],
pod['metadata']['uid'])
annotation = None
else:
state_dict = state.obj_to_primitive()