Skip to content
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

Allowing users to specify custom external-id #291

Open
mnaser opened this issue Nov 2, 2023 · 3 comments
Open

Allowing users to specify custom external-id #291

mnaser opened this issue Nov 2, 2023 · 3 comments

Comments

@mnaser
Copy link

mnaser commented Nov 2, 2023

I have a scenario where I'd like to add a bunch of values to external-ids (because my OVS bridge is tapped into OVN and I'd like to set iface-id).

It doesn't seem like there's a way to do it right now, am I missing something to allow this or is this not part of the ovs-cni scope?

@phoracek
Copy link
Member

phoracek commented Nov 2, 2023

Hey @mnaser! Do you want to set external-ids on Bridge, Port, or Interface object?

@mnaser
Copy link
Author

mnaser commented Apr 4, 2024

Hi @phoracek -- sorry, better late than ever. We'd want to put it on the Interface, so for example, we do this right now inside of a VM that's running in host networking mode:

ovs-vsctl --may-exist add-port br-int o-hm0 \
        -- set Interface o-hm0 type=internal \
        -- set Interface o-hm0 external-ids:iface-status=active \
        -- set Interface o-hm0 external-ids:attached-mac=$HM_PORT_MAC \
        -- set Interface o-hm0 external-ids:iface-id=$HM_PORT_ID \
        -- set Interface o-hm0 external-ids:skip_cleanup=true

We would really like/rather than instead, we relied on the OVS CNI somehow :)

@phoracek
Copy link
Member

phoracek commented May 26, 2024

@mnaser iface-id can be already configured by setting ovnPort in CNI_ARGS. The rest of the attributes however is not available.

I would be happy to accept a patch that extends the API in the following way:

  • It adds a new attribute to NetConf called allowedExternalIds
    type NetConf struct {
  • It accepts arbitrary external-id through NET_ARGS as long as it is listed in the NetConf

That way it will be possible for the user to request any external-id as long as it was allowed by the administrator in the network configuration.

cc @SchSeba

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

No branches or pull requests

2 participants