Merge "cells: add debug logging to bdm_update_or_create_at_top"

This commit is contained in:
Jenkins 2015-11-05 01:22:54 +00:00 committed by Gerrit Code Review
commit e52d236a3f
1 changed files with 6 additions and 0 deletions

View File

@ -1165,11 +1165,15 @@ class _BroadcastMessageMethods(_BaseMessageMethods):
for key in items_to_remove:
bdm.pop(key, None)
if create is None:
LOG.debug('Calling db.block_device_mapping_update_or_create from '
'API cell with values: %s', bdm)
self.db.block_device_mapping_update_or_create(message.ctxt,
bdm,
legacy=False)
return
elif create is True:
LOG.debug('Calling db.block_device_mapping_create from API '
'cell with values: %s', bdm)
self.db.block_device_mapping_create(message.ctxt, bdm,
legacy=False)
return
@ -1189,6 +1193,8 @@ class _BroadcastMessageMethods(_BaseMessageMethods):
LOG.warning(_LW("No match when trying to update BDM: %(bdm)s"),
dict(bdm=bdm))
return
LOG.debug('Calling db.block_device_mapping_update from API cell with '
'bdm id %s and values: %s', instance_bdm['id'], bdm)
self.db.block_device_mapping_update(message.ctxt,
instance_bdm['id'], bdm,
legacy=False)