Merge "Fix ServerAddressOutputMapping for private clusters" into stable/ussuri
This commit is contained in:
commit
ea59e6cb9b
|
@ -28,7 +28,7 @@ class ServerAddressOutputMapping(template_def.OutputMapping):
|
||||||
self.heat_output = self.public_ip_output_key
|
self.heat_output = self.public_ip_output_key
|
||||||
|
|
||||||
def set_output(self, stack, cluster_template, cluster):
|
def set_output(self, stack, cluster_template, cluster):
|
||||||
if not cluster_template.floating_ip_enabled:
|
if not cluster.floating_ip_enabled:
|
||||||
self.heat_output = self.private_ip_output_key
|
self.heat_output = self.private_ip_output_key
|
||||||
|
|
||||||
LOG.debug("Using heat_output: %s", self.heat_output)
|
LOG.debug("Using heat_output: %s", self.heat_output)
|
||||||
|
|
|
@ -65,7 +65,7 @@ class ServerAddressOutputMapping(template_def.NodeGroupOutputMapping):
|
||||||
self.is_stack_param = False
|
self.is_stack_param = False
|
||||||
|
|
||||||
def set_output(self, stack, cluster_template, cluster):
|
def set_output(self, stack, cluster_template, cluster):
|
||||||
if not cluster_template.floating_ip_enabled:
|
if not cluster.floating_ip_enabled:
|
||||||
self.heat_output = self.private_ip_output_key
|
self.heat_output = self.private_ip_output_key
|
||||||
|
|
||||||
LOG.debug("Using heat_output: %s", self.heat_output)
|
LOG.debug("Using heat_output: %s", self.heat_output)
|
||||||
|
|
|
@ -57,7 +57,7 @@ class MasterAddressOutputMapping(ServerAddressOutputMapping):
|
||||||
'swarm_secondary_masters_private']
|
'swarm_secondary_masters_private']
|
||||||
|
|
||||||
def set_output(self, stack, cluster_template, cluster):
|
def set_output(self, stack, cluster_template, cluster):
|
||||||
if not cluster_template.floating_ip_enabled:
|
if not cluster.floating_ip_enabled:
|
||||||
self.heat_output = self.private_ip_output_key
|
self.heat_output = self.private_ip_output_key
|
||||||
|
|
||||||
LOG.debug("Using heat_output: %s", self.heat_output)
|
LOG.debug("Using heat_output: %s", self.heat_output)
|
||||||
|
@ -76,7 +76,7 @@ class NodeAddressOutputMapping(ServerAddressOutputMapping):
|
||||||
private_ip_output_key = 'swarm_nodes_private'
|
private_ip_output_key = 'swarm_nodes_private'
|
||||||
|
|
||||||
def set_output(self, stack, cluster_template, cluster):
|
def set_output(self, stack, cluster_template, cluster):
|
||||||
if not cluster_template.floating_ip_enabled:
|
if not cluster.floating_ip_enabled:
|
||||||
self.heat_output = self.private_ip_output_key
|
self.heat_output = self.private_ip_output_key
|
||||||
|
|
||||||
LOG.debug("Using heat_output: %s", self.heat_output)
|
LOG.debug("Using heat_output: %s", self.heat_output)
|
||||||
|
|
|
@ -341,6 +341,7 @@ class BaseK8sTemplateDefinitionTestCase(base.TestCase):
|
||||||
mock_stack.to_dict.return_value = {'outputs': outputs}
|
mock_stack.to_dict.return_value = {'outputs': outputs}
|
||||||
mock_cluster_template = mock.MagicMock()
|
mock_cluster_template = mock.MagicMock()
|
||||||
mock_cluster_template.floating_ip_enabled = floating_ip_enabled
|
mock_cluster_template.floating_ip_enabled = floating_ip_enabled
|
||||||
|
self.mock_cluster.floating_ip_enabled = floating_ip_enabled
|
||||||
|
|
||||||
definition.update_outputs(mock_stack, mock_cluster_template,
|
definition.update_outputs(mock_stack, mock_cluster_template,
|
||||||
self.mock_cluster)
|
self.mock_cluster)
|
||||||
|
@ -1692,6 +1693,7 @@ class AtomicSwarmModeTemplateDefinitionTestCase(base.TestCase):
|
||||||
mock_stack.to_dict.return_value = {'outputs': outputs}
|
mock_stack.to_dict.return_value = {'outputs': outputs}
|
||||||
mock_cluster_template = mock.MagicMock()
|
mock_cluster_template = mock.MagicMock()
|
||||||
mock_cluster_template.floating_ip_enabled = floating_ip_enabled
|
mock_cluster_template.floating_ip_enabled = floating_ip_enabled
|
||||||
|
self.mock_cluster.floating_ip_enabled = floating_ip_enabled
|
||||||
|
|
||||||
definition.update_outputs(mock_stack, mock_cluster_template,
|
definition.update_outputs(mock_stack, mock_cluster_template,
|
||||||
self.mock_cluster)
|
self.mock_cluster)
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fix an issue with private clusters getting stuck in CREATE_IN_PROGRESS
|
||||||
|
status where floating_ip_enabled=True in the cluster template but this is
|
||||||
|
disabled when the cluster is created.
|
Loading…
Reference in New Issue