tripleo-heat-templates/overcloud-vlan-port.yaml
Steve Hardy 9cf073075c Don't replace OS::Neutron::Port on update
Due to an ununsual interface to OS::Neutron::Port resources,
it's necessary to specify replacement_policy: AUTO, or the
resource is unconditionally replaced on every stack update.

I've started discussion re possibly changing the default in
Heat, but right now, we need this or we have the bad outcome
of replacing all (!) compute and controller nodes on every
stack-update, even if the templates are unmodified.

Passing the AUTO value should be safe regardless of any
potential change of default value in Heat.

Change-Id: I6dd02ae17407f8f4c81ae418e5027f4f38ae4e9b
Closes-Bug: #1383709
2014-10-28 19:29:50 +00:00

40 lines
1.4 KiB
YAML

outputs:
controller0PublicIP:
description: Address for registering endpoints in the cloud.
value: {get_attr: [controller0_VLANPort, fixed_ips, 0, ip_address]}
resources:
# Override the main template which can also supply a static route.
controller0_99_VLANPort:
type: OS::Heat::StructuredDeployment
properties:
config: {get_resource: ControllerVLANPortConfig}
server: {get_resource: controller0}
signal_transport: NO_SIGNAL
input_values:
vlan_port:
list_join:
- '/'
- - {get_attr: [controller0_VLANPort, fixed_ips, 0, ip_address]}
# This should also be pulled out of the subnet. May need a
# neutron fix too - XXX make into a parameter and feed it
# in via _overcloud.sh for now.
- '24'
# Tell the instance to apply the default route.
# Reinstate when https://bugs.launchpad.net/heat/+bug/1336656 is
# sorted
# public_interface_route:
# get_attr: [controller0_VLANPort, fixed_ips, 0, subnet, gateway_ip]
ControllerVLANPortConfig:
type: OS::Heat::StructuredConfig
properties:
config:
neutron:
ovs:
public_interface_tag_ip: {get_input: vlan_port}
controller0_VLANPort:
type: OS::Neutron::Port
properties:
name: controller0_vlan
network: public
replacement_policy: AUTO