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

[release-4.15] OCPBUGS-29166: ovs-configure: fix vlan_parent calculation #4171

Conversation

openshift-cherrypick-robot

This is an automated cherry-pick of #4055

/assign zeeke

When converting a VLAN connection to a bridge, the case when
the target connection `vlan.parent` has been configured with a connection
UUID needs to be managed as a special case, as the bridge connection
has to target the underlying device instead of a connection UUID.

Use `nmcli connection show uuid <X>` to verify X is a connection UUID.

Previous condition `nmcli connection show <X>` evaluates to true if X
is either a connection name, a UUID or a connection path. This happens
to break when there are two connections with the same name, e.g.:

```
NAME        UUID                                  TYPE      DEVICE
bond0.3810  5960c784-fe08-45ec-ab4d-7c68edb4c0bc  vlan      bond0.3810
bond0       313f4e8e-f950-4a59-8015-0359675758d6  bond      bond0
bond0       c9ca866f-9211-498d-8ba5-ad7c182ce14d  bond      --
bond0.3810  cefa1736-7d08-41b6-96b0-7dbbf7bcbbb6  vlan      --
```
which output
```
++ nmcli --get-values vlan.parent conn show 5960c784-fe08-45ec-ab4d-7c68edb4c0bc
+ vlan_parent=bond0
+ '[' -z bond0 ']'
+ nmcli connection show bond0
++ nmcli --get-values GENERAL.DEVICES conn show bond0
+ vlan_parent='
bond0'
+ extra_phys_args=(dev "${vlan_parent}" id "${vlan_id}")
+ '[' '!' '' = 0 ']'
+ extra_phys_args+=(802-3-ethernet.cloned-mac-address "${iface_mac}")
+ nmcli connection show ovs-if-phys0
+ ovs-vsctl --timeout=30 --if-exists destroy interface bond0.3810
+ add_nm_conn type vlan conn.interface bond0.3810 ... 1500 dev '
bond0' id 3810 802-3-ethernet.cloned-mac-address e4:3d:1a:1b:26:1c
+ nmcli c add type vlan conn.interface bond0.3810 ... 1500 dev '
bond0' id 3810 802-3-ethernet.cloned-mac-address e4:3d:1a:1b:26:1c connection.autoconnect no
Error: Failed to add 'ovs-if-phys0' connection: vlan.parent: '
bond0' is neither an UUID nor an interface name
```

Note `vlan_parent` contains a new line character, as `nmcli conn show`
targets two connections.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
@openshift-ci-robot
Copy link
Contributor

@openshift-cherrypick-robot: Jira Issue OCPBUGS-24356 has been cloned as Jira Issue OCPBUGS-29166. Will retitle bug to link to clone.
/retitle [release-4.15] OCPBUGS-29166: ovs-configure: fix vlan_parent calculation

In response to this:

This is an automated cherry-pick of #4055

/assign zeeke

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot changed the title [release-4.15] OCPBUGS-24356: ovs-configure: fix vlan_parent calculation [release-4.15] OCPBUGS-29166: ovs-configure: fix vlan_parent calculation Feb 7, 2024
@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Feb 7, 2024
@openshift-ci-robot
Copy link
Contributor

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-29166, which is valid. The bug has been moved to the POST state.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • dependent bug Jira Issue OCPBUGS-24356 is in the state ON_QA, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-24356 targets the "4.16.0" version, which is one of the valid target versions: 4.16.0
  • bug has dependents

Requesting review from QA contact:
/cc @anuragthehatter

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This is an automated cherry-pick of #4055

/assign zeeke

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Feb 7, 2024
@pamoedom
Copy link

/retest

@zeeke
Copy link
Contributor

zeeke commented Feb 16, 2024

@jcaamano can you please take a look at this backport?

Copy link
Contributor

@trozet trozet left a comment

Choose a reason for hiding this comment

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

/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Feb 16, 2024
@trozet
Copy link
Contributor

trozet commented Feb 16, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2024
@trozet
Copy link
Contributor

trozet commented Feb 16, 2024

/assign @yuqi-zhang

Copy link
Contributor

openshift-ci bot commented Feb 16, 2024

@trozet: GitHub didn't allow me to assign the following users: yuqi-zhang.

Note that only openshift members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @yuqi-zhang

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.

@trozet
Copy link
Contributor

trozet commented Feb 16, 2024

/assign @sinnykumari

Copy link
Contributor

openshift-ci bot commented Feb 16, 2024

@trozet: GitHub didn't allow me to assign the following users: sinnykumari.

Note that only openshift members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @sinnykumari

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.

Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

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

Hmm, weird bot behaviour there. Note that 4.15 is in final stabalization period and requires explicit staff-eng approval to get this merged. Does this need to be in 4.15.0 release?

Copy link
Contributor

openshift-ci bot commented Feb 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: openshift-cherrypick-robot, trozet, yuqi-zhang

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 Feb 16, 2024
@zeeke
Copy link
Contributor

zeeke commented Feb 22, 2024

Hmm, weird bot behaviour there. Note that 4.15 is in final stabalization period and requires explicit staff-eng approval to get this merged. Does this need to be in 4.15.0 release?

This can go in a 4.15.z stream. No need to add noise to the release IMO

@zeeke
Copy link
Contributor

zeeke commented Feb 28, 2024

/retest

Copy link
Contributor

openshift-ci bot commented Feb 28, 2024

@openshift-cherrypick-robot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn 62e58d9 link false /test okd-scos-e2e-aws-ovn
ci/prow/okd-scos-e2e-gcp-ovn-upgrade 62e58d9 link false /test okd-scos-e2e-gcp-ovn-upgrade
ci/prow/okd-scos-e2e-gcp-op 62e58d9 link false /test okd-scos-e2e-gcp-op
ci/prow/okd-scos-e2e-vsphere-ovn 62e58d9 link false /test okd-scos-e2e-vsphere-ovn

Full PR test history. Your PR dashboard.

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.

@zeeke
Copy link
Contributor

zeeke commented Feb 28, 2024

Hmm, weird bot behaviour there. Note that 4.15 is in final stabalization period and requires explicit staff-eng approval to get this merged. Does this need to be in 4.15.0 release?

@sinnykumari, @yuqi-zhang no staff-eng approval needed anymore. Please, take a look when you have time.

@yuqi-zhang
Copy link
Contributor

This still needs cherry-pick approval, which we don't have the ability to apply. This generally comes from QE

@rbbratta
Copy link
Contributor

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Feb 29, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit f147304 into openshift:release-4.15 Feb 29, 2024
15 of 19 checks passed
@openshift-ci-robot
Copy link
Contributor

@openshift-cherrypick-robot: Jira Issue OCPBUGS-29166: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-29166 has been moved to the MODIFIED state.

In response to this:

This is an automated cherry-pick of #4055

/assign zeeke

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-machine-config-operator-container-v4.15.0-202403010011.p0.gf147304.assembly.stream.el8 for distgit ose-machine-config-operator.
All builds following this will include this PR.

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.15.0-0.nightly-2024-03-01-035644

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet