Skip to content

[ci_gen_kustomize_values] BGP: generate gateway IP for network bridges from CIDR#4053

Draft
eduolivares wants to merge 1 commit into
openstack-k8s-operators:mainfrom
eduolivares:nncp-bridge-gateway-ip
Draft

[ci_gen_kustomize_values] BGP: generate gateway IP for network bridges from CIDR#4053
eduolivares wants to merge 1 commit into
openstack-k8s-operators:mainfrom
eduolivares:nncp-bridge-gateway-ip

Conversation

@eduolivares

@eduolivares eduolivares commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • BGP deployments (bgp_dt01, bgp-l3-xl) use isGateway: true in the internalapi and storage NetworkAttachmentDefinitions, which causes the bridge CNI plugin to assign a gateway IP (e.g. 172.17.0.1/24) to the bridge when the first pod starts on the node.
  • Without this IP being explicitly set in the NNCP desired state, NMState periodically removes it during reconciliation, causing ovn-controller to lose connectivity to the OVN SB DB pods (typically after 24+ hours).
  • This change uses ansible.utils.nthhost(1) to derive the gateway IP directly from the network CIDR when generating values.yaml, so the architecture repo NNCP templates can include it in the desired state without requiring a hardcoded value.

This is the ci-framework counterpart to the fix in openstack-k8s-operators/architecture#783.

Related-Issue: #OSPRH-32725

AI attribution: commit message and PR description drafted with assistance from Claude Sonnet 4.6.

Test plan

  • Verify generated values.yaml contains correct gateway field for internalapi and storage networks in BGP deployments
  • Deploy a BGP environment and confirm internalapi/storage bridge gateway IPs are preserved after NMState reconciliation
  • Verify OVN SB DB pods remain reachable from compute/networker nodes after 24+ hours

Depends-On: openstack-k8s-operators/architecture#783

🤖 Generated with Claude Code

…s from CIDR

Use `ansible.utils.nthhost(1)` to derive the bridge gateway IP directly
from the network CIDR instead of requiring a hardcoded `gateway` field
in `values.yaml`. This ensures the `internalapi` and `storage` bridge
gateway addresses in BGP deployments are always consistent with the
configured subnet.

Required by the NNCP fix in the `architecture` repo (OSPRH-32725), where
the NNCP desired state must include the bridge gateway IP so NMState does
not remove it during periodic reconciliation cycles, which otherwise causes
`ovn-controller` to lose connectivity to the OVN SB DB pods.

Related-Issue: #OSPRH-32725

Assisted-By: Claude Sonnet 4.6
Signed-off-by: Eduardo Olivares <eolivare@redhat.com>
@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ccamposr for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eduolivares
eduolivares marked this pull request as draft July 14, 2026 10:42

@fultonj fultonj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/ef5a01fefc844e2c834dabb85f18f6be

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 54m 34s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 29m 24s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 40m 52s
cifmw-crc-podified-edpm-baremetal-minor-update FAILURE in 39m 00s
✔️ cifmw-pod-zuul-files SUCCESS in 5m 55s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 57s
✔️ cifmw-pod-k8s-snippets-source SUCCESS in 5m 45s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 46s
✔️ cifmw-architecture-validate-hci SUCCESS in 5m 48s
✔️ cifmw-molecule-ci_gen_kustomize_values SUCCESS in 8m 05s

@eduolivares

Copy link
Copy Markdown
Contributor Author

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants