fix network configuration
When deploying with `network_isolation: true`, we are failing to pass in the network settings from our configuration into the tripleo deployment process, leading ultimately to deployment failures when attempting to use non-default values. additionally, setting `network_isolation: true` required adding a number of explicit arguments to `extra_args`, so it was not possible to control the use of network isolation simply by toggling the value of `network_isolation`. This commits allows the deployment to succeed with `network_isolation` either disabled or enabled, and allows the use of non-default values for the network configuration. Change-Id: I68f5a87e390aa2ea8d8c5631eba17dc5dd44270e Closes-bug: #1581659
This commit is contained in:
parent
a052210bd4
commit
da478388da
|
@ -30,12 +30,10 @@ overcloud_nodes:
|
|||
introspect: false
|
||||
|
||||
# Tell tripleo about our environment.
|
||||
network_isolation: true
|
||||
extra_args: >-
|
||||
--control-scale 3 --neutron-network-type vxlan
|
||||
--neutron-tunnel-types vxlan
|
||||
-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml
|
||||
-e /usr/share/openstack-tripleo-heat-templates/environments/net-single-nic-with-vlans.yaml
|
||||
-e ~/network-environment.yaml
|
||||
-e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml
|
||||
--ntp-server pool.ntp.org
|
||||
deploy_timeout: 75
|
||||
|
|
|
@ -14,7 +14,6 @@ overcloud_nodes:
|
|||
extra_args: >-
|
||||
--neutron-network-type vxlan
|
||||
--neutron-tunnel-types vxlan
|
||||
-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml
|
||||
-e /usr/share/openstack-tripleo-heat-templates/environments/net-single-nic-with-vlans.yaml
|
||||
-e ~/network-environment.yaml
|
||||
--ntp-server pool.ntp.org
|
||||
|
||||
network_isolation: true
|
||||
|
|
|
@ -9,3 +9,5 @@ overcloud_nodes:
|
|||
|
||||
- name: compute_0
|
||||
flavor: compute
|
||||
|
||||
network_isolation: false
|
||||
|
|
|
@ -44,10 +44,14 @@ flavor_args: >-
|
|||
if flavor_map is defined and 'ceph' in flavor_map else 'oooq_ceph'}}
|
||||
|
||||
timeout_args: "--timeout {{deploy_timeout}}"
|
||||
|
||||
network_args: ""
|
||||
|
||||
deploy_args: >-
|
||||
{{ libvirt_args }}
|
||||
{{ flavor_args }}
|
||||
{{ timeout_args }}
|
||||
{{ network_args }}
|
||||
{{ extra_args }}
|
||||
|
||||
step_deploy_overcloud: true
|
||||
|
|
|
@ -12,8 +12,12 @@ bash_deploy_ramdisk: false
|
|||
step_install_undercloud: true
|
||||
|
||||
network_environment_args:
|
||||
NeutronExternalNetworkBridge: '""'
|
||||
ControlPlaneSubnetCidr: '"24"'
|
||||
ControlPlaneDefaultRoute: 192.0.2.1
|
||||
EC2MetadataIp: 192.0.2.1
|
||||
ExternalNetCidr: "{{ undercloud_external_network_cidr }}"
|
||||
ExternalAllocationPools: >
|
||||
[{'start': '{{ undercloud_external_network_cidr|nthhost(4) }}',
|
||||
'end': '{{ undercloud_external_network_cidr|nthhost(250) }}'}]
|
||||
NeutronExternalNetworkBridge: ""
|
||||
ControlPlaneSubnetCidr: "{{ undercloud_network_cidr|ipaddr('prefix') }}"
|
||||
ControlPlaneDefaultRoute: "{{ undercloud_network_cidr|nthhost(1) }}"
|
||||
EC2MetadataIp: "{{ undercloud_network_cidr|nthhost(1) }}"
|
||||
DnsServers: ['8.8.8.8','8.8.4.4']
|
||||
|
|
|
@ -37,3 +37,12 @@
|
|||
dest: "{{ working_dir }}/network-environment.yaml"
|
||||
mode: 0755
|
||||
when: network_isolation
|
||||
|
||||
- name: set network_args fact
|
||||
set_fact:
|
||||
network_args: >-
|
||||
-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml
|
||||
-e /usr/share/openstack-tripleo-heat-templates/environments/net-single-nic-with-vlans.yaml
|
||||
-e $HOME/network-environment.yaml
|
||||
when: network_isolation
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
parameter_defaults:
|
||||
{% for key, value in network_environment_args.items() %}
|
||||
{{ key }}: {{ value }}
|
||||
{% endfor %}
|
||||
{#
|
||||
This takes advantage of the fact that valid JSON is also
|
||||
valid YAML. The default to_nice_yaml filter doesn't quote strings,
|
||||
which can cause unexpected implicit type conversion when the
|
||||
resulting YAML is consumed, whereas with JSON all strings are quoted.
|
||||
#}
|
||||
{% set parameter_defaults = {'parameter_defaults': network_environment_args} %}
|
||||
{{ parameter_defaults|to_nice_json }}
|
||||
|
|
Loading…
Reference in New Issue