-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconcile ipset when osnetconfig changes #1112
Reconcile ipset when osnetconfig changes #1112
Conversation
When e.g. a network definition changes, the IPsets have to reconcile to update its information. This allows changing network definition, but needs to be done carefully and tests in a pre-prod env as it is an invasive change. The process looks like this: * update the OpenStackNetConfig to do the network change * validate the IPSet for the role and the OpenStackNetConfig status reflects the new IPs for the nodes ``` 172.18.3.20/24 ``` * Make sure you have a parameter file to allow update the network config for the role: ``` network-environment.yaml: | parameter_defaults: ControllerNetworkConfigUpdate: True ComputeNetworkConfigUpdate: True ComputeLeaf1NetworkConfigUpdate: True ``` * use the OpenStackConfigGenerator resource to create a new configversion * when config generator process finished, depending on the number of changed, the new created openstackconfigversion will show the diff (gets trunkated if it is too big) ``` diff: | diff --git a/source-templates/environments/deployed-network-environment.yaml b/source-templates/environments/deployed-network-environment.yaml index 168a9242caa93630d17ade3d254604b967a3a3f0..d08508054b2fc8e01d8f6499b08fba25fbe84860 100644 --- a/source-templates/environments/deployed-network-environment.yaml +++ b/source-templates/environments/deployed-network-environment.yaml @@ -99,2 +98,2 @@ storage_subnet: - cidr: '172.18.3.0/24' - gateway_ip: '172.18.3.1' + cidr: '172.18.0.0/24' + gateway_ip: '172.18.0.1' @@ -208 +207 @@ storage: - - 172.18.3.0/24 + - 172.18.0.0/24 ... ``` * use the OpenStackDeploy resource to apply the generated configversion to the overcloud Notes: * from checking the overcloud node, the /etc/os-net-config/config.yaml and /etc/sysconfig/network-scripts/ifcfg-enp5s0 are correct. When checking the running interface configuration we still see the old IP address 172.18.0.10. Reboot the node/if-down|if-up would fix it. This is not an OSPdO issue. 6: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000 link/ether 02:c8:20:00:00:04 brd ff:ff:ff:ff:ff:ff inet 172.18.0.10/32 brd 172.18.0.255 scope global enp5s0 valid_lft forever preferred_lft forever inet 172.18.3.20/24 scope global enp5s0 valid_lft forever preferred_lft forever inet 172.18.3.10/32 scope global enp5s0 valid_lft forever preferred_lft forever inet6 fe80::c8:20ff:fe00:4/64 scope link valid_lft forever preferred_lft forever * General on changing networks. when e.g. removing a network from the openstackclient will still have a reservation on that network resolved: https://bugzilla.redhat.com/show_bug.cgi?id=2325902
currently if a new network gets added to the openstackclient network list, the ipset and pod annotation gets updated, but the interface is not configured. Therefore this change makes sure that the openstackclient pod gets restarted when the network list changes related https://bugzilla.redhat.com/show_bug.cgi?id=2325902 Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: olliewalsh, stuggi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
3ac6cfd
into
openstack-k8s-operators:master
/cherry-pick v1.3.x |
@stuggi: #1112 failed to apply on top of branch "v1.3.x":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
When e.g. a network definition changes, the IPsets have to reconcile to update its information. This allows changing network definition, but needs to be done carefully and tests in a pre-prod env as it is an invasive change.
The process looks like this:
Notes:
/etc/os-net-config/config.yaml
and/etc/sysconfig/network-scripts/ifcfg-enp5s0
are correct.When checking the running interface configuration we still see the old IP address 172.18.0.10. Reboot the node/if-down|if-up would fix it.
This is not an OSPdO issue.
Also restart openstackclient pod if network attachment list changes currently if a new network gets added to the openstackclient network list, the ipset and pod annotation gets updated, but the interface is not configured. Therefore this change makes sure that the openstackclient pod gets restarted when the network list changes
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2325902