Print uid with log to facilitate log tracking
Change-Id: I371ebae572042688934f51524df888be1a468bf4 Signed-off-by: Nayan Deshmukh <n.deshmukh@samsung.com>
This commit is contained in:
parent
1e11b11d50
commit
b3d808fb80
|
@ -186,12 +186,16 @@ class VIFHandler(k8s_base.ResourceEventHandler):
|
|||
def _set_pod_state(self, pod, state):
|
||||
# TODO(ivc): extract annotation interactions
|
||||
if not state:
|
||||
LOG.debug("Removing VIFs annotation: %r", state)
|
||||
LOG.debug("Removing VIFs annotation: %r for pod %s/%s (uid: %s)",
|
||||
state, pod['metadata']['namespace'],
|
||||
pod['metadata']['name'], pod['metadata']['uid'])
|
||||
annotation = None
|
||||
else:
|
||||
state_dict = state.obj_to_primitive()
|
||||
annotation = jsonutils.dumps(state_dict, sort_keys=True)
|
||||
LOG.debug("Setting VIFs annotation: %r", annotation)
|
||||
LOG.debug("Setting VIFs annotation: %r for pod %s/%s (uid: %s)",
|
||||
annotation, pod['metadata']['namespace'],
|
||||
pod['metadata']['name'], pod['metadata']['uid'])
|
||||
|
||||
labels = pod['metadata'].get('labels')
|
||||
if not labels:
|
||||
|
|
|
@ -62,8 +62,10 @@ class Dispatcher(h_base.EventHandler):
|
|||
obj = event.get('object', {})
|
||||
obj_meta = obj.get('metadata', {})
|
||||
|
||||
LOG.debug("%d handler(s) available for event %s %s:%s", len(handlers),
|
||||
event.get('type'), obj.get('kind'), obj_meta.get('name'))
|
||||
LOG.debug("%d handler(s) available for event %s %s:%s/%s (uid: %s)",
|
||||
len(handlers), event.get('type'), obj.get('kind'),
|
||||
obj_meta.get('namespace'), obj_meta.get('name'),
|
||||
obj_meta.get('uid'))
|
||||
|
||||
for handler in handlers:
|
||||
handler(event)
|
||||
|
|
Loading…
Reference in New Issue