Fix get_common_node_group behavior
Now if common nodegroup has not been found for given nodes None as a result is returned instead of default node group. This directly affects procedure of VIP allocation as (e.g.) VIPs will not be allocated when cluster does not have assigned nodes. Tests updated accordingly Change-Id: Iaa94453f3f98cc9238f9810aab7311ffabbfa8b7 Closes-Bug: #1549254
This commit is contained in:
parent
a72d2f6862
commit
e15ad4ab63
|
@ -107,6 +107,11 @@ class TestUpgradeHelperCloneCluster(base_tests.BaseCloneClusterTest):
|
|||
self.public_net_data['ip_ranges'])
|
||||
|
||||
def test_copy_vips(self):
|
||||
# save network information before node reassignment to seed cluster
|
||||
# as after that no VIP will be allocated/serialized due to
|
||||
# absence of assigned nodes for the source cluster
|
||||
orig_nets = self.serialize_nets(self.src_cluster.cluster)
|
||||
|
||||
new_cluster = self.helper.clone_cluster(self.src_cluster, self.data)
|
||||
|
||||
# we have to move node to new cluster before VIP assignment
|
||||
|
@ -117,7 +122,6 @@ class TestUpgradeHelperCloneCluster(base_tests.BaseCloneClusterTest):
|
|||
|
||||
self.helper.copy_vips(self.src_cluster, new_cluster)
|
||||
|
||||
orig_nets = self.serialize_nets(self.src_cluster.cluster)
|
||||
new_nets = self.serialize_nets(new_cluster.cluster)
|
||||
|
||||
self.assertEqual(orig_nets["management_vip"],
|
||||
|
|
Loading…
Reference in New Issue