Skip to content

[switch_config] Add BGP configuration for Juniper switches - #4292

Open
mnietoji wants to merge 1 commit into
openstack-k8s-operators:mainfrom
mnietoji:switch-config-junos-bgp
Open

mnietoji wants to merge 1 commit into
openstack-k8s-operators:mainfrom
mnietoji:switch-config-junos-bgp

Conversation

@mnietoji

Copy link
Copy Markdown
Contributor

NFV EVPN labs use a Juniper switch as the BGP-EVPN route-reflector for the EDPM computes (and the traffic generator), but switch_config could only handle interfaces, VLANs, LACP, IGMP snooping and DCB. The route-reflector had to be configured by hand, so a fresh environment came up with its EVPN control plane silently down (computes stuck in Active towards the RR).

Add an optional bgp key to the switch vars that renders set routing-options ... and set protocols bgp group ... lines (local AS, router-id, groups with type/local-address/peer-as/cluster/families/ neighbors) plus extra_lines for any raw Junos set statement not covered by the schema (e.g. the irb interface carrying the RR address). Only set lines are pushed, so groups owned by other environments on a shared switch are left untouched.

@openshift-ci

openshift-ci Bot commented Oct 23, 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 mnietoji 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

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

NFV EVPN labs use a Juniper switch as the BGP-EVPN route-reflector for the
EDPM computes (and the traffic generator), but switch_config could only
handle interfaces, VLANs, LACP, IGMP snooping and DCB. The route-reflector
had to be configured by hand, so a fresh environment came up with its
EVPN control plane silently down (computes stuck in Active towards the RR).

Add an optional `bgp` key to the switch vars that renders
`set routing-options ...` and `set protocols bgp group ...` lines (local
AS, router-id, groups with type/local-address/peer-as/cluster/families/
neighbors) plus `extra_lines` for any raw Junos `set` statement not covered
by the schema (e.g. the irb interface carrying the RR address). A neighbor
can be given as a mapping with a per-neighbor TCP-MD5 `authentication_key`,
so peers that sign their sessions (e.g. EDPM FRR with a neighbor password)
can share a group with peers that do not. Only `set`
lines are pushed, so groups owned by other environments on a shared switch
are left untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mnietoji
mnietoji force-pushed the switch-config-junos-bgp branch from f943979 to 6ab7158 Compare October 23, 2026 14:12
@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/41f48e911582425e9ed3cffc5a2e2a71

✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 23m 21s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 26m 35s
✔️ podified-multinode-edpm-deployment-crc-centos-10 SUCCESS in 1h 23m 31s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 36m 30s
❌ cifmw-crc-podified-edpm-baremetal-minor-update FAILURE in 2h 10m 22s (non-voting)
✔️ periodic-podified-edpm-baremetal-minor-update-bootc-master-ocp-crc SUCCESS in 1h 50m 03s (non-voting)
✔️ cifmw-pod-zuul-files SUCCESS in 4m 55s
❌ openstack-k8s-operators-content-provider-bootc NODE_FAILURE Node(set) request 100-0000249076 failed in 0s
⚠️ cifmw-crc-podified-edpm-baremetal-bootc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider-bootc (non-voting)
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 33s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 49s
✔️ cifmw-molecule-switch_config SUCCESS in 2m 21s

Warning:
File .kube/http-cache/58d4363e5b5bd30e095238b0ec5d42f2 found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-zuul-files. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/http-cache/596239d8158c9e304863ae34e9b235c0 found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-zuul-files. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/http-cache/87a697f916b532cf44ccb197ff7ba2e3 found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-zuul-files. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/cache/discovery/38.102.83.186_9023/servergroups.json found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-zuul-files. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/cache/discovery/38.102.83.186_9023/v1/serverresources.json found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-zuul-files. Add to preserve-home-paths if safe, or otherwise remove.
File .ssh/config found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/pod-jobs.yml for job cifmw-pod-zuul-files. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/http-cache/bdd7b2cb6584e62d442216995e51db5f found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-ansible-test. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/http-cache/3418855402ab8666a195458ea6d5d4a2 found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-ansible-test. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/http-cache/a0a4de7d63733803eeececaa48e4969f found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-ansible-test. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/cache/discovery/38.102.83.139_9023/servergroups.json found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-ansible-test. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/cache/discovery/38.102.83.139_9023/v1/serverresources.json found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-ansible-test. Add to preserve-home-paths if safe, or otherwise remove.
File .ssh/config found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/pod-jobs.yml for job cifmw-pod-ansible-test. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/http-cache/58d4363e5b5bd30e095238b0ec5d42f2 found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-pre-commit. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/http-cache/596239d8158c9e304863ae34e9b235c0 found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-pre-commit. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/http-cache/87a697f916b532cf44ccb197ff7ba2e3 found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-pre-commit. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/cache/discovery/38.102.83.186_9023/servergroups.json found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-pre-commit. Add to preserve-home-paths if safe, or otherwise remove.
File .kube/cache/discovery/38.102.83.186_9023/v1/serverresources.json found in build home directory during playbook review.rdoproject.org/rdo-jobs/playbooks/base/pre.yaml for job cifmw-pod-pre-commit. Add to preserve-home-paths if safe, or otherwise remove.
File .ssh/config found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/pod-jobs.yml for job cifmw-pod-pre-commit. Add to preserve-home-paths if safe, or otherwise remove.
File .ssh/config found in build home directory during playbook opendev.org/zuul/zuul-jobs/playbooks/unittests/pre.yaml for job cifmw-molecule-switch_config. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/0fd53a21fd0e4c11b09e814566fc2cc7 found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job periodic-podified-edpm-baremetal-minor-update-bootc-master-ocp-crc. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/7fc28d58ecde45c890442b042e41fc7b found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job periodic-podified-edpm-baremetal-minor-update-bootc-master-ocp-crc. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/e2e5c0adbd9d408895c2170be9c603a0 found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job periodic-podified-edpm-baremetal-minor-update-bootc-master-ocp-crc. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/9f56b1c23b144b9abbc89effc5fabc7d found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job periodic-podified-edpm-baremetal-minor-update-bootc-master-ocp-crc. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/0fd53a21fd0e4c11b09e814566fc2cc7 found in build home directory during playbook review.rdoproject.org/config/playbooks/ci-framework-rdo-base/dlrn/dlrn-report.yaml for job periodic-podified-edpm-baremetal-minor-update-bootc-master-ocp-crc. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/2c4475bb15814d2582a3ca333bc075bc found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job podified-multinode-edpm-deployment-crc-centos-10. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/2b8e9a7a01b14f0da175deaffb34e797 found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job podified-multinode-edpm-deployment-crc-centos-10. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/2c4475bb15814d2582a3ca333bc075bc found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/multinode-autohold.yml for job podified-multinode-edpm-deployment-crc-centos-10. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/2b8e9a7a01b14f0da175deaffb34e797 found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/multinode-autohold.yml for job podified-multinode-edpm-deployment-crc-centos-10. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/2c4475bb15814d2582a3ca333bc075bc found in build home directory during playbook review.rdoproject.org/config/playbooks/crc/print-machineconfigpool.yaml for job podified-multinode-edpm-deployment-crc-centos-10. Add to preserve-home-paths if safe, or otherwise remove.
File .ssh/known_hosts.old found in build home directory during playbook review.rdoproject.org/config/playbooks/base-minimal/post-logs.yaml for job podified-multinode-edpm-deployment-crc-centos-10. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/5ee07e73623d41e5a23e9090901afd4e found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job podified-multinode-edpm-deployment-crc. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/8c061f824d0142a487d250ad301bb4cc found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job podified-multinode-edpm-deployment-crc. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/5ee07e73623d41e5a23e9090901afd4e found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/multinode-autohold.yml for job podified-multinode-edpm-deployment-crc. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/8c061f824d0142a487d250ad301bb4cc found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/multinode-autohold.yml for job podified-multinode-edpm-deployment-crc. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/5ee07e73623d41e5a23e9090901afd4e found in build home directory during playbook review.rdoproject.org/config/playbooks/crc/print-machineconfigpool.yaml for job podified-multinode-edpm-deployment-crc. Add to preserve-home-paths if safe, or otherwise remove.
File .ssh/known_hosts.old found in build home directory during playbook review.rdoproject.org/config/playbooks/base-minimal/post-logs.yaml for job podified-multinode-edpm-deployment-crc. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/f7c991afd8ed4e49a0b50a2b418480ba found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job cifmw-crc-podified-edpm-baremetal. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/d58a98ac1684409c8a62624a20aeb857 found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job cifmw-crc-podified-edpm-baremetal. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/c8efc7af00964d1b90319221c1597767 found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job cifmw-crc-podified-edpm-baremetal. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/53bfe3daf00c4b07b6008f77c0b3c2e3 found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job cifmw-crc-podified-edpm-baremetal. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/e6479adf58254eee937946d8cf610402 found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job cifmw-crc-podified-edpm-baremetal. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/c9129ce9019b405bb86778a1a11ff3fe found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job cifmw-crc-podified-edpm-baremetal-minor-update. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/bb0e0e6284254b6c80c7acf26358ffb4 found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job cifmw-crc-podified-edpm-baremetal-minor-update. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/f5efd5f3534641d1a5abbadef015b400 found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job cifmw-crc-podified-edpm-baremetal-minor-update. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/82349626ba5b40af947eb0c3c3f79652 found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job cifmw-crc-podified-edpm-baremetal-minor-update. Add to preserve-home-paths if safe, or otherwise remove.
File ansible/tmp/39fdcaa2658a409ca9e09b83a91224d8 found in build home directory during playbook github.com/openstack-k8s-operators/ci-framework/ci/playbooks/collect-logs.yml for job cifmw-crc-podified-edpm-baremetal-minor-update. Add to preserve-home-paths if safe, or otherwise remove.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant