Remove configuration_data from instance.system_metadata before save
For Activation Engine, instance would have a configuration_data in its system metadata, powervc driver does not need this and before save nova instance, we need to remove this system metdata. Otherwise db will not throw exception. Closes-Bug: #1410649 Change-Id: I3fef4ae8c2d99dc103164fa346a2424185e773f5
This commit is contained in:
parent
b06a892915
commit
a717ce4cec
|
@ -326,6 +326,8 @@ class PowerVCDriver(driver.ComputeDriver):
|
|||
if constants.PVC_ID in meta.keys():
|
||||
del(meta[constants.PVC_ID])
|
||||
instance['metadata'] = meta
|
||||
# remove activation engine configuration_data as db is not allowed
|
||||
instance.system_metadata.pop('configuration_data', None)
|
||||
instance.save()
|
||||
LOG.debug('Saved instance with clearing pvc_id in metadata during'
|
||||
'spawn failure: %s', instance)
|
||||
|
|
|
@ -606,6 +606,8 @@ class PowerVCService(object):
|
|||
orig_instance['architecture'] = constants.PPC64
|
||||
orig_instance['power_state'] = powerstate
|
||||
orig_instance['metadata'] = meta
|
||||
# remove activation engine configuration data as db is not allowed
|
||||
orig_instance.system_metadata.pop('configuration_data', None)
|
||||
orig_instance.save()
|
||||
LOG.debug('Saved instance after created PowerVC instance: %s',
|
||||
orig_instance)
|
||||
|
|
Loading…
Reference in New Issue