Skip to content

Use RBAC while connecting ovn-controllers to SB database#541

Open
slawqo wants to merge 3 commits intoopenstack-k8s-operators:mainfrom
slawqo:issue/OSPRH-1922
Open

Use RBAC while connecting ovn-controllers to SB database#541
slawqo wants to merge 3 commits intoopenstack-k8s-operators:mainfrom
slawqo:issue/OSPRH-1922

Conversation

@slawqo
Copy link
Copy Markdown
Contributor

@slawqo slawqo commented Mar 20, 2026

This patch configures RBAC to access OVN SB databases so that ovn-controllers now have limited access to this DB and will only be able to modify its own data.

On the other hand Northd requires "full access" to the SB DB, and to achieve that there is another DB listener created on port 16642 for to be used by northd.

More info about OVN RBAC can be found in its documentation at [1].

[1] https://docs.ovn.org/en/latest/tutorials/ovn-rbac.html

Depends-On: openstack-k8s-operators/install_yamls#1145

Related: #OSPRH-1921
Closes: #OSPRH-1922

@openshift-ci openshift-ci Bot requested review from averdagu and dprince March 20, 2026 14:27
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 20, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: slawqo

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

The pull request process is described 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

@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/8881a8dd8a39461b9ead8d3463084988

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 44m 44s
ovn-operator-tempest-multinode FAILURE in 1h 25m 57s

@softwarefactory-project-zuul
Copy link
Copy Markdown

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/openstack-k8s-operators/ovn-operator for 541,afae1d8f2f153534b28de9d99d9329592503bbee

@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/488938ee0adc4b9487ec13c9295691f0

✔️ openstack-k8s-operators-content-provider SUCCESS in 45m 25s
ovn-operator-tempest-multinode FAILURE in 27m 07s

@slawqo slawqo force-pushed the issue/OSPRH-1922 branch from 89eeff9 to d4fdeb5 Compare April 2, 2026 09:13
@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/654e83d776ca4981a32478cb381b8b58

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 26m 19s
ovn-operator-tempest-multinode FAILURE in 1h 05m 45s

@slawqo slawqo force-pushed the issue/OSPRH-1922 branch from d4fdeb5 to c2aa939 Compare April 7, 2026 08:41
@slawqo
Copy link
Copy Markdown
Contributor Author

slawqo commented Apr 7, 2026

/retest

@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/3ea8ac21e62a4d3687373043b2aac30c

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 35m 08s
ovn-operator-tempest-multinode FAILURE in 1h 09m 05s

@slawqo slawqo force-pushed the issue/OSPRH-1922 branch from c2aa939 to fd93761 Compare April 7, 2026 14:44
@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/3020f70e344a4bf2a149888db9ae7484

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 50m 20s
ovn-operator-tempest-multinode FAILURE in 1h 30m 56s

@slawqo slawqo force-pushed the issue/OSPRH-1922 branch from fd93761 to 04ebb94 Compare April 8, 2026 10:56
@slawqo
Copy link
Copy Markdown
Contributor Author

slawqo commented Apr 8, 2026

/retest

@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/41732a57e8994014aedf53c79eb8b7d6

openstack-k8s-operators-content-provider FAILURE in 11m 36s
⚠️ ovn-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@slawqo slawqo force-pushed the issue/OSPRH-1922 branch from 04ebb94 to 5e0896b Compare April 9, 2026 09:26
@slawqo
Copy link
Copy Markdown
Contributor Author

slawqo commented Apr 9, 2026

/retest

@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/47d3989a993f4f908da945b581e1be23

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 44m 44s
ovn-operator-tempest-multinode FAILURE in 1h 26m 41s

@slawqo
Copy link
Copy Markdown
Contributor Author

slawqo commented Apr 14, 2026

/retest

@slawqo
Copy link
Copy Markdown
Contributor Author

slawqo commented Apr 15, 2026

/test ovn-operator-build-deploy-kuttl

@slawqo
Copy link
Copy Markdown
Contributor Author

slawqo commented Apr 15, 2026

/retest

@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/1edf1c78e85242d5a14101aebfb98895

✔️ openstack-k8s-operators-content-provider SUCCESS in 37m 59s
ovn-operator-tempest-multinode FAILURE in 20m 14s

@slawqo slawqo force-pushed the issue/OSPRH-1922 branch from a59ff00 to 150e3d8 Compare April 15, 2026 14:38
@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/fdeb4472016e46158b575418fe9afc2a

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 48m 58s
ovn-operator-tempest-multinode FAILURE in 1h 30m 13s

@slawqo slawqo force-pushed the issue/OSPRH-1922 branch from 150e3d8 to 690eb12 Compare April 16, 2026 09:09
@slawqo
Copy link
Copy Markdown
Contributor Author

slawqo commented Apr 16, 2026

/retest

@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/8f9885c8e75f449b9f54f59f4e2e6f0c

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 46m 54s
ovn-operator-tempest-multinode FAILURE in 1h 27m 34s

slawqo added a commit to slawqo/openstack-operator that referenced this pull request Apr 16, 2026
This new secret is created by the ovn-operator with patch [1] and
contains OVN SB DB certificate which next is used to sign certificates
used by the ovn-controller on each of the edpm nodes.
This is required to use OVN RBAC for the connection between
ovn-controllers and ovn southband DB.

[1] openstack-k8s-operators/ovn-operator#541

Related: #OSPRH-1921

Signed-off-by: Slawek Kaplonski <skaplons@redhat.com>
@stuggi
Copy link
Copy Markdown
Contributor

stuggi commented Apr 16, 2026

  • do the ovn-controllers on the edpm nodes also need a rbac cert? how would they get it?
  • right now all CA certs/service certs are managed by the openstack-op, either ctlplane cotnroller, or dataplanecontroller, and services just consume the generated. not sure if we could keep that? or if it could work. there also certs for edpm nodes get created/requested.
  • how would backup/restore work for this. just thinking about it as I work on b/r for the ctlplane (except ovn). we have to think about this.

@slawqo slawqo force-pushed the issue/OSPRH-1922 branch from 690eb12 to 72978b2 Compare April 17, 2026 12:57
@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/e4063877124947a49c2677689b9a9ec7

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 58m 58s
ovn-operator-tempest-multinode FAILURE in 1h 32m 49s

@softwarefactory-project-zuul
Copy link
Copy Markdown

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/openstack-k8s-operators/ovn-operator for 541,fe1eabff75e0dbe623321b567f8d02f287c00e5b

@slawqo slawqo marked this pull request as ready for review April 21, 2026 09:33
@openshift-ci openshift-ci Bot requested a review from abays April 21, 2026 09:33
slawqo added 3 commits April 21, 2026 11:34
This cert will be then used to sign "per chassis" certificates used by
the ovn-controllers to connect to the DB with OVN RBAC enabled [1].

[1] https://docs.ovn.org/en/latest/tutorials/ovn-rbac.html

Related: #OSPRH-1922

Assisted-by: claude-opus-4.6

Signed-off-by: Slawek Kaplonski <skaplons@redhat.com>
With this patch instead of using the same SSL certificate by each of the
ovn-controller PODs in the environment, there is separate certificate
generated, with unique CN name which match system-id set in that chassis
and signed with certificate from SB.
That way OVN RBAC can be used for the connections from ovn-controller
PODs to the OVS SB database.

Related: #1922

Assisted-by: claude-opus-4.6

Signed-off-by: Slawek Kaplonski <skaplons@redhat.com>
This patch configures RBAC to access OVN SB databases so that
ovn-controllers now have limited access to this DB and will only be able
to modify its own data.

On the other hand Northd requires "full access" to the SB DB, and to
achieve that there is another DB listener created on port 16642 for
to be used by northd.

More info about OVN RBAC can be found in its documentation at [1].

[1] https://docs.ovn.org/en/latest/tutorials/ovn-rbac.html

Related: #1922

Assisted-by: claude-opus-4.6

Signed-off-by: Slawek Kaplonski <skaplons@redhat.com>
@softwarefactory-project-zuul
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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/3de86cf04a0d4fa0942a754344657355

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 51m 30s
ovn-operator-tempest-multinode FAILURE in 1h 25m 55s

@slawqo
Copy link
Copy Markdown
Contributor Author

slawqo commented Apr 21, 2026

  • do the ovn-controllers on the edpm nodes also need a rbac cert? how would they get it?

Yes, they need it too. I proposed to mount secret with that SB Cert to the ansibleee pod and then generate SSL cert for each node in that Ansibleee POD and copy it to the edpm node. PRs for that part are openstack-k8s-operators/openstack-operator#1895 and openstack-k8s-operators/edpm-ansible#1158

* right now all CA certs/service certs are managed by the openstack-op, either ctlplane cotnroller, or dataplanecontroller,  and services just consume the generated. not sure if we could keep that? or if it could work. there also certs for edpm nodes get created/requested.

Are you saying that I should generate all certs by openstack-operator or that I should do that only for the SB Cert which is later used to sign certificates for OVN controller (PODs and services running on edpm nodes)? The problem with the latter is that certificates used by ovn-controller have to have CN field which matches "system-id" from that node and have to be signed with cert generated on the SB DB POD. So how it could all be handled by openstack-operator? Should we generate uuids for ovn-controller PODs there too?

* how would backup/restore work for this. just thinking about it as I work on b/r for the ctlplane (except ovn). we have to think about this.

I didn't test backup/restore really but I'm not sure what problem we could have with it. Isn't backup/restore already doing backup of certificates on the nodes?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants