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

getOrCreatePort: add support to configure port Profile #964

Merged
merged 1 commit into from
Aug 12, 2021
Merged

getOrCreatePort: add support to configure port Profile #964

merged 1 commit into from
Aug 12, 2021

Conversation

EmilienM
Copy link
Contributor

@EmilienM EmilienM commented Aug 10, 2021

Configuring port profiles can be useful to enable an application
running on the specified host to pass and receive VIF port-specific
information to the plugin.

One of the use-cases here is when configuring ports in OVS Hardware
offload, where we need to use the profile:
{"capabilities": ["switchdev"]}

Thanks to this patch, we'll now able to do it when creating the
machines and their ports.

Fix #965

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Aug 10, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @EmilienM. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 10, 2021
@tobiasgiese
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 10, 2021
@tobiasgiese
Copy link
Member

Could you please create an issue for this PR? :)

@EmilienM
Copy link
Contributor Author

Could you please create an issue for this PR? :)

done!

@EmilienM
Copy link
Contributor Author

I don't know why it says I didn't sign the CLA, because I did. Is there a way to retrigger this check?

@tobiasgiese
Copy link
Member

tobiasgiese commented Aug 10, 2021

/retest

@EmilienM seems there is an issue with the pull-cluster-api-provider-openstack-test. You should check the logs or run the tests locally

@tobiasgiese
Copy link
Member

tobiasgiese commented Aug 10, 2021

I don't know why it says I didn't sign the CLA, because I did. Is there a way to retrigger this check?

The test will succeed automatically after you have signed the CLA successfully. Unfortunately, I don‘t know what should have gone wrong

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 11, 2021
@EmilienM
Copy link
Contributor Author

/hold

sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha4:-: name requested for invalid type: interface{}
sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha4:-: invalid map value type: interface{}

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 11, 2021
api/v1alpha4/types.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 11, 2021
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 11, 2021
@tobiasgiese
Copy link
Member

tobiasgiese commented Aug 11, 2021

You could try adding the Profile to the e2e tests (i.e., to the cluster-template.yaml)

@EmilienM
Copy link
Contributor Author

You could try adding the Profile to the e2e tests (i.e., to the cluster-template.yaml)

cluster-template.yaml has not port creation, I'll see if we can add one, with a Profile. Maybe into another PR, if possible.

@tobiasgiese
Copy link
Member

cluster-template.yaml has not port creation, I'll see if we can add one, with a Profile. Maybe into another PR, if possible.

Okay for me 👍🏻

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 11, 2021
@EmilienM
Copy link
Contributor Author

/test pull-cluster-api-provider-openstack-e2e-test

@tobiasgiese
Copy link
Member

tobiasgiese commented Aug 11, 2021

I found the following in the capo-controller-manager Pod logs

(rule:create_port and rule:create_port:binding:profile) is disallowed by policy

E0811 15:28:07.856507       1 controller.go:304] controller-runtime/manager/controller/openstackcluster "msg"="Reconciler error" "error"="failed to reconcile bastion: Request forbidden: [POST http://10.0.2.15:9696/v2.0/ports], error message: {\"NeutronError\": {\"type\": \"PolicyNotAuthorized\", \"message\": \"(rule:create_port and rule:create_port:binding:profile) is disallowed by policy\", \"detail\": \"\"}}" "name"="cluster-e2e-a0kfgh" "namespace"="e2e-a0kfgh" "reconciler group"="infrastructure.cluster.x-k8s.io" "reconciler kind"="OpenStackCluster"

@EmilienM
Copy link
Contributor Author

I found the following in the capo-controller-manager Pod logs

(rule:create_port and rule:create_port:binding:profile) is disallowed by policy

E0811 15:28:07.856507       1 controller.go:304] controller-runtime/manager/controller/openstackcluster "msg"="Reconciler error" "error"="failed to reconcile bastion: Request forbidden: [POST http://10.0.2.15:9696/v2.0/ports], error message: {\"NeutronError\": {\"type\": \"PolicyNotAuthorized\", \"message\": \"(rule:create_port and rule:create_port:binding:profile) is disallowed by policy\", \"detail\": \"\"}}" "name"="cluster-e2e-a0kfgh" "namespace"="e2e-a0kfgh" "reconciler group"="infrastructure.cluster.x-k8s.io" "reconciler kind"="OpenStackCluster"

nicely found. I suspect we'll have to set it to nil by default.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 11, 2021
Configuring port profiles can be useful to enable an application
running on the specified host to pass and receive VIF port-specific
information to the plugin.

One of the use-cases here is when configuring ports in OVS Hardware
offload, where we need to use the profile:
{"capabilities": ["switchdev"]}

Thanks to this patch, we'll now able to do it when creating the
machines and their ports.
@EmilienM
Copy link
Contributor Author

@tobiasgiese for review again. Thanks!

@tobiasgiese
Copy link
Member

/lgtm
👍🏻

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 12, 2021
@tobiasgiese
Copy link
Member

tobiasgiese commented Aug 12, 2021

Can you PTAL @jichenjc :)
Unfortunately, I don't have the permission to approve

@jichenjc
Copy link
Contributor

/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 12, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: EmilienM, jichenjc

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 12, 2021
@k8s-ci-robot k8s-ci-robot merged commit 4debc1f into kubernetes-sigs:master Aug 12, 2021
@EmilienM EmilienM deleted the profile_support branch August 12, 2021 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Profile support when configuring a Neutron port
4 participants