Updating network configuration after a deployment With Red Hat OpenStack Platform Director
Environment
- Red Hat Enterprise Linux OpenStack Platform 7.
- Red Hat OpenStack Platform 8.
- Red Hat OpenStack Platform 9.
- Red Hat OpenStack Platform 10.
- Red Hat OpenStack Platform 11.
- Red Hat OpenStack Platform 12.
- Red Hat OpenStack Platform 13.
- Red Hat OpenStack Platform 16.
- Red Hat OpenStack Platform 17.
Issue
- Why does Red Hat Openstack Director does not modify network layout of existing nodes properly ?
- Cannot change network configuration after a deployment
- Is it possible to update the network configuration after a deployment
- Force network creation on re-deploy
NetworkDeploymentActions: ['CREATE', 'UPDATE']- update networking on deployment
- update network on re-deploy
- how to update network on overcloud deployment
- update network config on deployment
- cannot modify network configuration after a deployment
Resolution
Note:
Before running `openstack overcloud deploy (...)` command in OSP16 and before or `openstack overcloud node provision (...)` command in OSP17, it is recommended to disable stonith to avoid unexpected fencing action.
Please check stonith-enabled property in `sudo pcs property show` command on one of the overcloud controller nodes and temporarily disable it by running `sudo pcs property set stonith-enabled=false` command if it is enabled.
After running `openstack overcloud deploy (...)` command in OSP16 and before or `openstack overcloud node provision (...)` command in OSP17, please check the stonith-enabled property again and restore the status.
To push the network configuration change correctly, the following 3 step process needs to be applied. Note that Step 1 requires that openstack overcloud deploy (...) be run.
1. Updating network
For RHOSP < 17
Add NetworkDeploymentActions: ['CREATE','UPDATE'] to section parameter_defaults: of a top-level template environment file (e.g. network-environment.yaml). Then, run openstack overcloud deploy (...):
parameter_defaults:
(...)
NetworkDeploymentActions: ['CREATE','UPDATE']
Limit this operation to nodes of a specific role with {{role}}NetworkDeploymentActions. E.g., for the Compute role:
parameter_defaults:
ComputeNetworkDeploymentActions: ['CREATE','UPDATE']
For RHOSP >= 17
At node provision phase
In overcloud-baremetal-deploy.yaml file, add the line network_config_update: true inside network_config statement for the roles where you want to apply the changes. Then re-provision the nodes with openstack overcloud node provision ... command. After that, run openstack overcloud deploy (...)
- name: Controller
...
defaults:
...
network_config:
network_config_update: true
At deployment phase
In any environment file included in the openstack overcloud deploy command with -e, for example /home/stack/templates/network-environment.yaml, add the line NetworkConfigUpdate parameter corresponding to the role you want to apply the changes under parameter_defaults. Then run openstack overcloud deploy (...)
parameter_defaults:
ControllerNetworkConfigUpdate: true
ComputeNetworkConfigUpdate: true
...
2. Remove NetworkDeploymentActions from templates
For RHOSP < 17
Make sure to explicitly set NetworkDeploymentActions to ['CREATE'] before running a future openstack overcloud deploy:
parameter_defaults:
(...)
NetworkDeploymentActions: ['CREATE']
Note: It is not necessary to run
openstack overcloud deployagain immediately. ButNetworkDeploymentActions: ['CREATE']must be set for the next run.
For RHOSP >= 17
In overcloud-baremetal-deploy.yaml file, remove the the line network_config_update: true or set the value to false inside network_config statement for the roles where you want to apply the changes and remove {{role}}NetworkConfigUpdate: true parameter from the deployment environment. Re-provision and re-deployment are not necessary immediately, but that parameter must be set for the next run.
Root Cause
Normally, to update or modify an existing deployment, changes need to be made in the different heat templates and a new instance of openstack overcloud deploy must be run. This will ensure that every node gets the new configuration correctly.
By default, however, subsequent changes made to the network configuration templates (bonding options, mtu, bond type, etc) are not applied when openstack overcloud deploy is launched with NetworkDeploymentActions: ['CREATE']. Without the UPDATE option, the metadata will not be updated and the changes in the network templates will not be applied. Instead, os-net-config would read the existing metadata on each node and not make any change.
Note: NetworkDeploymentActions does not allow changing network CIDR for a network which is currently being used by the overcloud. This is due to the fact that neutron does not support changing CIDR for subnet and an attempt to do this via tripleo will cause heat to attempt to run a neutron network delete and recreate the subnet with the new required CIDR.
Diagnostic Steps
- Modify a network template
- Change the bonding options
- Run
openstack overcloud deploy - Check that nodes did not get the change correctly
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.