Log the right attached configuration id

Method 'rolling_configuration_update' in trove/cluster/models.py.
It allow re-applying the same configuration to an instance.In if code
block, if the instance does not attach any configuration or it has
attached the configuration that the parameter passed, then do attach
thing. "else" block means the instance has attached another config,
should use "instance.configuration.id" instead of "configuration_id",
one is a attached configuration, one is a wanted configuration, and
they are not the same.
Besides, fix a spelling mistake in trove/instance/models.py

Change-Id: I4b6fb338de611ce39a8173dcf4b6e17714c380b9
Closes-Bug: 1693466
This commit is contained in:
zhanggang 2017-05-31 02:28:30 -04:00
parent 321b38219c
commit 650235435d
1 changed files with 2 additions and 1 deletions

View File

@ -445,7 +445,8 @@ class Cluster(object):
LOG.debug(
"Node '%(inst_id)s' already has the configuration "
"'%(conf_id)s' attached.",
{'inst_id': instance.id, 'conf_id': configuration_id})
{'inst_id': instance.id,
'conf_id': instance.configuration.id})
# Configuration has been persisted to all instances.
# The cluster is in a consistent state with all nodes