Skip to content

Commit 0df21a6

Browse files
committed
EDPM deployment should not do network cleanup by default
With nmstate-provider set as default for os-net-config, default cleanup during update/adoption is not desired. Signed-off-by: <[email protected]> Jira: https://issues.redhat.com/browse/OSPRH-16537 https://issues.redhat.com/browse/OSPRH-17036
1 parent 62a987c commit 0df21a6

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

docs/source/roles/role-edpm_network_config.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ This Ansible role does the following tasks:
1919
- Checks for the presence of required RPMS
2020
- Uses "provider" ifcfg/nmstate based on flag "edpm_network_config_nmstate"
2121

22-
Note: By default this role will cleanup devices/interfaces not in
23-
"edpm_network_config_template". If there is requirement to keep them
24-
for pre-provisioned nodes, "edpm_network_config_nonconfigured_cleanup"
25-
ansible var can be set to "false".
22+
Note: * With nmstate-provider as the default for os-net-config,
23+
"os-net-config --cleanup" should be used only for very
24+
specific use case, eg
25+
- SSH provisioned over VLAN-tagged single interface
26+
- os-net-config needs to override ctlplane over bond+VLAN
27+
28+
* "os-net-config --cleanup" SHOULD NOT be set for update/adoption
29+
use case
2630

2731
Here is an example playbook to run os-net-config tool:
2832

roles/edpm_network_config/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ edpm_network_config_safe_defaults: false
5454
edpm_network_config_template: ""
5555
edpm_bond_interface_ovs_options: "bond_mode=active-backup"
5656
edpm_dns_search_domains: []
57-
edpm_network_config_nonconfigured_cleanup: true
57+
edpm_network_config_nonconfigured_cleanup: false

roles/edpm_network_config/meta/argument_specs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ argument_specs:
8181
default: nic1
8282
edpm_network_config_nonconfigured_cleanup:
8383
type: bool
84-
description: "Cleanup network interfaces not in network config"
85-
default: true
84+
description: "Cleanup network interfaces before network config"
85+
default: false

roles/edpm_network_config/molecule/nmstate/converge.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# License for the specific language governing permissions and limitations
1515
# under the License.
1616

17-
1817
- name: Converge
1918
hosts: all
2019
gather_facts: false
@@ -30,9 +29,11 @@
3029
state: up
3130
ipv4:
3231
address:
33-
- ip: 192.168.180.2
34-
prefix-length: 24
32+
- ip: 192.168.180.2
33+
prefix-length: 24
3534
dhcp: false
3635
enabled: true
36+
ipv6:
37+
enabled: false
3738
roles:
3839
- role: osp.edpm.edpm_network_config

0 commit comments

Comments
 (0)