Skip to content

Conversation

@winiciusallan
Copy link
Contributor

@winiciusallan winiciusallan commented Dec 30, 2025

This PR adds the binding:profile field to the Port controller.

  • Part of the implementation was inspired by the already implemented controller on CAPO.
  • The profile field on the port API is originally a free-form dict, but I decided to not expose in that way to only support the Neutron values.
  • I also added a change on e2e action, because we need to override the default neutron policy so we can create and update ports with profile, since it is allowed by "services users" by default.

Partial: #616

To test properly the binding:profile field, we need to override the
default policies to allow stack user to create and update it.

The warning section here[1] on docs discuss better.

[1] https://docs.openstack.org/api-ref/network/v2/index.html#port-binding-extended-attributes

Signed-off-by: Winicius Silva <[email protected]>
@github-actions github-actions bot added the semver:minor Backwards-compatible change label Dec 30, 2025
@winiciusallan
Copy link
Contributor Author

There is a difference between this implementation and the implemented on CAPO - I have used the capabilities field instead of a boolean value that indicates whether OVS hardware offload must be enabled or not. I believe that the latest avoid user error, but the first uses exactly what Openstack returns to us.

Wdty? cc. @mandre

Also, I'm spending some time configuring an environment to test the changes to the CI that I made before running again.

Copy link
Collaborator

@mandre mandre left a comment

Choose a reason for hiding this comment

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

I wonder if we really want to add binding profile. Neutron recently changed their policy to restrict this API to service accounts via https://review.opendev.org/c/openstack/neutron/+/909075 as we're not supposed to use this API directly.

CAPO needs to be updated: kubernetes-sigs/cluster-api-provider-openstack#2172

@winiciusallan
Copy link
Contributor Author

Oh,thanks, I didn't know of this change on upstream. But yeah, the docs says it mustn't be used for end users

This field is only meant for machine-machine communication for compute services like Nova, Ironic or Zun to pass information to a Neutron back-end. It should not be used by multiple services concurrently or by cloud end users.

When implementing I was wondering too what was the use case for supporting this. @lentzi90, do you have any idea if this is strictly necessary?

@lentzi90
Copy link
Contributor

lentzi90 commented Jan 5, 2026

When implementing I was wondering too what was the use case for supporting this. @lentzi90, do you have any idea if this is strictly necessary?

I must confess I don't have a clue. It could even be something that was implemented for CI convenience. I remember cleaning up a few places where we used to rely on OpenStack admin credentials in the e2e tests.

@winiciusallan
Copy link
Contributor Author

I must confess I don't have a clue. It could even be something that was implemented for CI convenience. I remember cleaning up a few places where we used to rely on OpenStack admin credentials in the e2e tests.

Ok, got it. Thanks. So, I'll move forward to close this pull request and create another one that adds the port_trusted_vif extension as added here[1] in upstream.

I believe we won't want an incompatible API and expose a non-supported field for the end users.

[1] https://review.opendev.org/c/openstack/neutron/+/926068

@winiciusallan
Copy link
Contributor Author

It seems that we will need to add this extension to gophercloud first, I have created this issue for tracking.

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

Labels

semver:minor Backwards-compatible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants