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

Bug 1964540: Extend trunk configuration to port level in machineset #185

Merged
merged 2 commits into from
Jul 29, 2021

Conversation

adduarte
Copy link

@adduarte adduarte commented Jul 7, 2021

Extend trunk configuration to port level in machineset
With the introduction of new technologies, like SR-IOV,
it is required that the user have the ability to
configured trunked and not-trunked ports for the same machines
using spec.ports.trunk.

  • Extended trunk support needed check to cover spec.port and spec.network
  • Makes ports inherit trunk setting from spec.Trunk if not specified.
  • Refactored trunking to its own function. Trunk name matches port name
  • Added trunking to spec.ports

OSASINFRA-2504

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 7, 2021
@openshift-ci openshift-ci bot requested review from EmilienM and Fedosin July 7, 2021 09:57
@adduarte
Copy link
Author

adduarte commented Jul 8, 2021

As it currently stands, this patch brings us up to par with kubernetes-sigs/cluster-api-provider-openstack functionality:
you can define interfaces under "network" and "port" and you can trunk All of them or None of them.

This make a deployment using kuryr but with SR-IOV ports not trunked impossible.

@adduarte
Copy link
Author

/retest

@adduarte
Copy link
Author

This functionality is being addressed upstream in pr kubernetes-sigs#934.
Is best if we rework this pr to mirror upstream code and logic.

@adduarte adduarte force-pushed the OSASINFRA-2504 branch 6 times, most recently from da7e047 to 6455359 Compare July 21, 2021 03:32
@adduarte adduarte changed the title [WIP] Extend trunk configuration to port level in machineset Extend trunk configuration to port level in machineset Jul 21, 2021
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 21, 2021
@dulek
Copy link

dulek commented Jul 21, 2021

Looks good to me, but I'll leave the lgtm label for folks that are more familiar with this code.

@adduarte
Copy link
Author

/uncc Fedosin
/cc mandre

@openshift-ci openshift-ci bot requested review from mandre and removed request for Fedosin July 21, 2021 15:21
@adduarte
Copy link
Author

/approve (just to be explicit)

@openshift-ci
Copy link

openshift-ci bot commented Jul 21, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adduarte

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 21, 2021
Copy link
Member

@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 think it should work - CI at least shows there is no regression. Were you able to test this patch?

pkg/apis/openstackproviderconfig/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/apis/openstackproviderconfig/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/cloud/openstack/clients/machineservice.go Outdated Show resolved Hide resolved
pkg/cloud/openstack/clients/machineservice.go Outdated Show resolved Hide resolved
pkg/cloud/openstack/clients/machineservice.go Outdated Show resolved Hide resolved
pkg/cloud/openstack/clients/machineservice.go Outdated Show resolved Hide resolved
@adduarte
Copy link
Author

I should have enough testing done locally to verify its functionality soon.

@adduarte adduarte force-pushed the OSASINFRA-2504 branch 2 times, most recently from 6d8e493 to b012228 Compare July 23, 2021 04:27
@adduarte
Copy link
Author

@mandre just spend the day testing and it seems to work as expected. Made some trivial changes to name trunks consistently.
But I tested
network.trunk = true & port.trunk=(nil|false,true) and network.trunk=false & port.trunk=(nil,false,true) and all seems to work as expected.

@mandre mandre changed the title Extend trunk configuration to port level in machineset Bug 1964540: Extend trunk configuration to port level in machineset Jul 23, 2021
@openshift-ci
Copy link

openshift-ci bot commented Jul 23, 2021

@adduarte: This pull request references Bugzilla bug 1964540, which is invalid:

  • expected the bug to target the "4.9.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1964540: Extend trunk configuration to port level in machineset

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.

@openshift-ci openshift-ci bot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jul 23, 2021
@mandre
Copy link
Member

mandre commented Jul 23, 2021

/bugzilla refresh

@openshift-ci openshift-ci bot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jul 23, 2021
@openshift-ci
Copy link

openshift-ci bot commented Jul 23, 2021

@mandre: This pull request references Bugzilla bug 1964540, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @eurijon

In response to this:

/bugzilla refresh

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.

@openshift-ci
Copy link

openshift-ci bot commented Jul 23, 2021

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: eurijon.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@mandre: This pull request references Bugzilla bug 1964540, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @eurijon

In response to this:

/bugzilla refresh

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.

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.

@adduarte adduarte force-pushed the OSASINFRA-2504 branch 2 times, most recently from 52b7473 to 530bc77 Compare July 25, 2021 06:29
@adduarte
Copy link
Author

Addressed comment about trunkName. See inline reply

@adduarte
Copy link
Author

@dulek could you take a ,ook at the code that sets the name of the trunk.
Perhaps we shoudl not change the name of the trunk at all...

@iamemilio
Copy link

we should probably wait for the upstream patch to settle and merge before approving this, it seems like they are still addressing some comments.

@mandre
Copy link
Member

mandre commented Jul 26, 2021

we should probably wait for the upstream patch to settle and merge before approving this, it seems like they are still addressing some comments.

Keep in mind we're talking about downstream CAPO and we want to retire this code soon anyway. We don't have to wait for the upstream code to merge (we'll inherit it anyway once we move to MAPO), however we need to make absolutely sure the API is stable and agreed on upstream. This is what we must implement in this patch.

With the introduction of new technologies, like SR-IOV,
it is required that the user have the ability to
configured trunked and not-trunked ports for the same machines
using spec.ports.trunk.

- Extended trunk support needed check to cover spec.port and spec.network
- Makes ports inherit trunk setting from spec.Trunk if not specified.
- Refactored trunking to its own function. Trunk name matches port name
- Added trunking to spec.ports
- Trunks created for instances are named after their parent port.

OSASINFRA-2504

Co-authored-by: Martin André <[email protected]>
@adduarte
Copy link
Author

the current version of this patch mimics upstream:
trunks are created with trunkname=port.name,

@iamemilio
Copy link

Keep in mind we're talking about downstream CAPO and we want to retire this code soon anyway. We don't have to wait for the upstream code to merge (we'll inherit it anyway once we move to MAPO), however we need to make absolutely sure the API is stable and agreed on upstream. This is what we must implement in this patch.

true, as long as the upstream api is stable, I suppose its ok

@iamemilio
Copy link

little nit pick, but otherwise lgtm

@iamemilio
Copy link

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 29, 2021
@openshift-merge-robot openshift-merge-robot merged commit 065b0b4 into openshift:master Jul 29, 2021
@openshift-ci
Copy link

openshift-ci bot commented Jul 29, 2021

@adduarte: All pull requests linked via external trackers have merged:

Bugzilla bug 1964540 has been moved to the MODIFIED state.

In response to this:

Bug 1964540: Extend trunk configuration to port level in machineset

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.

@pierreprinetti pierreprinetti deleted the OSASINFRA-2504 branch March 29, 2022 12:45
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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants