-
Notifications
You must be signed in to change notification settings - Fork 392
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.14] OCPBUGS-33590: ovs-configure: fix vlan_parent
calculation
#4361
base: release-4.14
Are you sure you want to change the base?
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-29166 has been cloned as Jira Issue OCPBUGS-33590. 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-33590, which is invalid:
Comment 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. |
/lgtm |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jcaamano, openshift-cherrypick-robot The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
@openshift-cherrypick-robot: The following test 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-sigs/prow repository. I understand the commands that are listed here. |
This is an automated cherry-pick of #4171
/assign zeeke