Remove stack_action for os-net-config
Since we're using ephemeral Heat, there is no UPDATE stack action. All actions are now CREATE. Therefore, we can no longer rely on the stack action to update the network configuration and NetworkDeploymentActions is no longer an option. This change adds a new parameter tripleo_network_config_update. This will be a bool. Change-Id: If53577a26edcb2dc67458603286471dfb87f0bda
This commit is contained in:
parent
dfe20f7c18
commit
306ceffaf5
12
releasenotes/notes/network-update-var-e5082d1bed8d8cde.yaml
Normal file
12
releasenotes/notes/network-update-var-e5082d1bed8d8cde.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Introduce a new variable tripleo_network_config_update. This will be a
|
||||
bool. When tripleo_network_config_update is True. Existing network
|
||||
configurations will be updated. By default, this is False and only
|
||||
new deployments will have the networks configured.
|
||||
deprecations:
|
||||
- |
|
||||
This change removes the tripleo_network_config_action. Since we can no
|
||||
longer rely on the Heat stack action when using Ephemeral Heat in
|
||||
tripleo
|
@ -52,11 +52,7 @@ _NETWORK_CONFIG_SCHEMA = {
|
||||
'template': {'type': 'string'},
|
||||
'physical_bridge_name': {'type': 'string'},
|
||||
'public_interface_name': {'type': 'string'},
|
||||
'network_deployment_actions': {
|
||||
'type': 'array',
|
||||
'items': {'type': 'string',
|
||||
'enum': ['CREATE', 'UPDATE']}
|
||||
},
|
||||
'network_config_update': {'type': 'boolean'},
|
||||
'net_config_data_lookup': {'type': 'object'},
|
||||
'default_route_network': {
|
||||
'type': 'array',
|
||||
|
@ -85,12 +85,12 @@ options:
|
||||
- Which interface to add to the public bridge
|
||||
type: string
|
||||
default: nic1
|
||||
network_deployment_actions:
|
||||
network_config_update:
|
||||
description:
|
||||
- When to apply network configuration changes, allowed values
|
||||
are CREATE and UPDATE.
|
||||
type: list
|
||||
default: ['CREATE']
|
||||
are True or False.
|
||||
type: boolean
|
||||
default: False
|
||||
networks_skip_config:
|
||||
description:
|
||||
- List of networks that should be skipped when configuring node
|
||||
@ -123,7 +123,7 @@ Controller:
|
||||
template: templates/multiple_nics/multiple_nics.j2
|
||||
physical_bridge_name: br-ex
|
||||
public_interface_name: nic1
|
||||
network_deployment_actions: ['CREATE']
|
||||
network_config_update: False
|
||||
net_config_data_lookup: {}
|
||||
bond_interface_ovs_options: bond_mode=balance-slb
|
||||
vars:
|
||||
@ -134,14 +134,14 @@ Compute:
|
||||
template: templates/multiple_nics/multiple_nics.j2
|
||||
physical_bridge_name: br-ex
|
||||
public_interface_name: nic1
|
||||
network_deployment_actions: ['CREATE']
|
||||
network_config_update: False
|
||||
net_config_data_lookup: {}
|
||||
bond_interface_ovs_options: bond_mode=balance-slb
|
||||
overcloud-compute-1:
|
||||
template: templates/multiple_nics/multiple_nics.j2
|
||||
physical_bridge_name: br-ex
|
||||
public_interface_name: nic1
|
||||
network_deployment_actions: ['CREATE']
|
||||
network_config_update: False
|
||||
net_config_data_lookup: {}
|
||||
bond_interface_ovs_options: bond_mode=balance-slb
|
||||
vars:
|
||||
@ -157,7 +157,7 @@ EXAMPLES = '''
|
||||
template: templates/multiple_nics/multiple_nics.j2
|
||||
physical_bridge_name: br-ex
|
||||
public_interface_name: nic1
|
||||
network_deployment_actions: ['CREATE']
|
||||
network_config_update: False
|
||||
net_config_data_lookup: {}
|
||||
bond_interface_ovs_options: bond_mode=balance-slb
|
||||
- hostname: overcloud-novacompute-0
|
||||
@ -165,7 +165,7 @@ EXAMPLES = '''
|
||||
template: templates/multiple_nics/multiple_nics.j2
|
||||
physical_bridge_name: br-ex
|
||||
public_interface_name: nic1
|
||||
network_deployment_actions: ['CREATE']
|
||||
network_config_update: False
|
||||
net_config_data_lookup: {}
|
||||
bond_interface_ovs_options: bond_mode=balance-slb
|
||||
- hostname: overcloud-novacompute-1
|
||||
@ -173,7 +173,7 @@ EXAMPLES = '''
|
||||
template: templates/multiple_nics/multiple_nics.j2
|
||||
physical_bridge_name: br-ex
|
||||
public_interface_name: nic1
|
||||
network_deployment_actions: ['CREATE']
|
||||
network_config_update: False
|
||||
net_config_data_lookup: {}
|
||||
bond_interface_ovs_options: bond_mode=balance-slb
|
||||
hostname_role_map:
|
||||
@ -196,8 +196,7 @@ def translate_opts_for_tripleo_network_config_role(network_config):
|
||||
template='tripleo_network_config_template',
|
||||
physical_bridge_name='neutron_physical_bridge_name',
|
||||
public_interface_name='neutron_public_interface_name',
|
||||
network_deployment_actions=('tripleo_network_config_'
|
||||
'network_deployment_actions'),
|
||||
network_config_update=('tripleo_network_config_update'),
|
||||
net_config_data_lookup='tripleo_network_config_os_net_config_mappings',
|
||||
)
|
||||
|
||||
|
@ -31,14 +31,13 @@
|
||||
roles:
|
||||
- role: tripleo_network_config
|
||||
vars:
|
||||
# The conditions in tripleo_network_config role for when we want to
|
||||
# apply the NetworkConfig are:
|
||||
# 1. If the stack_action is CREATE
|
||||
# 2. Or UPDATE is in the network_deployment_actions
|
||||
# 3. Or the previous run of NetworkConfig failed.
|
||||
# 4. Or it has never run
|
||||
#
|
||||
# Since we don't have stack_action in this case. Set the network
|
||||
# config action to UPDATE here so that we only apply network
|
||||
# configuration if 2, 3 or 4 evalueates to TRUE.
|
||||
tripleo_network_config_action: UPDATE
|
||||
# The conditions here are when we want to apply the
|
||||
# NetworkConfig. They are:
|
||||
# - If tripleo_network_config_update is True
|
||||
# - Or the previous run of NetworkConfig failed.
|
||||
# - Or it has never run
|
||||
# This will match the prior behavior of when a Heat
|
||||
# SoftwareDeployment was used.
|
||||
# It also ensures the script does exist as a sine qua non
|
||||
# condition
|
||||
tripleo_network_config_update: True
|
||||
|
@ -18,7 +18,7 @@
|
||||
# All variables intended for modification should be placed in this file.
|
||||
|
||||
# All variables within this role should have a prefix of "tripleo_network_config"
|
||||
tripleo_network_config_action: CREATE
|
||||
tripleo_network_config_update: False
|
||||
tripleo_network_config_async_poll: 3
|
||||
tripleo_network_config_async_timeout: 300
|
||||
tripleo_network_config_bridge_name: br-ex
|
||||
@ -26,7 +26,6 @@ tripleo_network_config_debug: "{{ (ansible_verbosity | int) >= 2 | bool }}"
|
||||
tripleo_network_config_hide_sensitive_logs: true
|
||||
tripleo_network_config_interface_name: nic1
|
||||
tripleo_network_config_manage_service: true
|
||||
tripleo_network_config_network_deployment_actions: []
|
||||
tripleo_network_config_os_net_config_mappings: {}
|
||||
tripleo_network_config_safe_defaults: true
|
||||
tripleo_network_config_with_ansible: false
|
||||
|
@ -108,8 +108,7 @@
|
||||
|
||||
# The conditions here are when we want to apply the
|
||||
# NetworkConfig. They are:
|
||||
# - If the stack_action is CREATE
|
||||
# - Or UPDATE is in the network_deployment_actions
|
||||
# - If tripleo_network_config_update is True
|
||||
# - Or the previous run of NetworkConfig failed.
|
||||
# - Or it has never run
|
||||
# This will match the prior behavior of when a Heat
|
||||
@ -117,8 +116,7 @@
|
||||
# It also ensures the script does exist as a sine qua non
|
||||
# condition
|
||||
when:
|
||||
- (tripleo_network_config_action == "CREATE") or
|
||||
("UPDATE" in tripleo_network_config_network_deployment_actions) or
|
||||
- (tripleo_network_config_update) or
|
||||
(os_net_config_returncode_stat.stat.exists and
|
||||
((os_net_config_returncode_slurp.content | b64decode | int) != 0)) or
|
||||
(not os_net_config_returncode_stat.stat.exists)
|
||||
|
@ -65,8 +65,7 @@ class TestTripleoGenerateInventoryNetworkConfig(tests_base.TestCase):
|
||||
'networks_skip_config': [],
|
||||
'neutron_physical_bridge_name': 'br-ex',
|
||||
'neutron_public_interface_name': 'nic1',
|
||||
'tripleo_network_config_network_deployment_actions':
|
||||
['CREATE'],
|
||||
'tripleo_network_config_update': False,
|
||||
'tripleo_network_config_os_net_config_mappings': {},
|
||||
'tripleo_network_config_template': '/foo/template.j2'}
|
||||
},
|
||||
@ -81,8 +80,7 @@ class TestTripleoGenerateInventoryNetworkConfig(tests_base.TestCase):
|
||||
'networks_skip_config': [],
|
||||
'neutron_physical_bridge_name': 'br-ex',
|
||||
'neutron_public_interface_name': 'nic1',
|
||||
'tripleo_network_config_network_deployment_actions':
|
||||
['CREATE'],
|
||||
'tripleo_network_config_update': False,
|
||||
'tripleo_network_config_template':
|
||||
'templates/net_config_bridge.j2'}},
|
||||
'vars': {
|
||||
|
Loading…
Reference in New Issue
Block a user