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.14] OCPBUGS-33590: ovs-configure: fix vlan_parent calculation #4361

Open
wants to merge 1 commit into
base: release-4.14
Choose a base branch
from

Conversation

openshift-cherrypick-robot

This is an automated cherry-pick of #4171

/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-29166 has been cloned as Jira Issue OCPBUGS-33590. Will retitle bug to link to clone.
/retitle [release-4.14] OCPBUGS-33590: ovs-configure: fix vlan_parent calculation

In response to this:

This is an automated cherry-pick of #4171

/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.14] OCPBUGS-29166: ovs-configure: fix vlan_parent calculation [release-4.14] OCPBUGS-33590: ovs-configure: fix vlan_parent calculation May 13, 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. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 13, 2024
@openshift-ci-robot
Copy link
Contributor

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-33590, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required"

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

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 #4171

/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.

@jcaamano
Copy link
Contributor

/lgtm

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

openshift-ci bot commented May 13, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jcaamano, openshift-cherrypick-robot
Once this PR has been reviewed and has the lgtm label, please assign yuqi-zhang for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zeeke
Copy link
Contributor

zeeke commented May 13, 2024

/retest

Copy link
Contributor

openshift-ci bot commented May 13, 2024

@openshift-cherrypick-robot: The following test 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 6e51009 link false /test okd-scos-e2e-aws-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-sigs/prow repository. I understand the commands that are listed here.

@zeeke
Copy link
Contributor

zeeke commented May 14, 2024

Hi @jcaamano , @trozet . Can you help here with the approve and backport-risk-assessed labels?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. 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. 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

4 participants