From 650235435d599a2151cdaf8a46c91651fa6d7a08 Mon Sep 17 00:00:00 2001 From: zhanggang Date: Wed, 31 May 2017 02:28:30 -0400 Subject: [PATCH] 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 --- trove/cluster/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trove/cluster/models.py b/trove/cluster/models.py index 4f330eed13..698d508ad9 100644 --- a/trove/cluster/models.py +++ b/trove/cluster/models.py @@ -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