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
[release-4.15] OCPBUGS-29166: ovs-configure: fix vlan_parent
calculation
#4171
Conversation
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-cherrypick-robot: Jira Issue OCPBUGS-24356 has been cloned as Jira Issue OCPBUGS-29166. Will retitle bug to link to clone. In response to this:
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. |
vlan_parent
calculationvlan_parent
calculation
@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
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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. |
/retest |
@jcaamano can you please take a look at this backport? |
There was a problem hiding this 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
/lgtm |
/assign @yuqi-zhang |
@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. In response to this:
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. |
/assign @sinnykumari |
@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. In response to this:
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. |
There was a problem hiding this 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?
[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 |
This can go in a 4.15.z stream. No need to add noise to the release IMO |
/retest |
@openshift-cherrypick-robot: The following tests failed, say
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. |
@sinnykumari, @yuqi-zhang no |
This still needs cherry-pick approval, which we don't have the ability to apply. This generally comes from QE |
/label cherry-pick-approved |
f147304
into
openshift:release-4.15
@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:
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. |
[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. |
Fix included in accepted release 4.15.0-0.nightly-2024-03-01-035644 |
This is an automated cherry-pick of #4055
/assign zeeke