Skip to content

Bug 1887040: OVS config: check if OVS is installed#2154

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
trozet:ovs_installed_workaround
Oct 15, 2020
Merged

Bug 1887040: OVS config: check if OVS is installed#2154
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
trozet:ovs_installed_workaround

Conversation

@trozet
Copy link
Copy Markdown
Contributor

@trozet trozet commented Oct 13, 2020

With UPI installs, openvswitch package is not installed until after
upgrade. In the ovs-configuration.service there is a Requires
declaration on openvswitch.service. However due to a bug in systemd,
ovs-configuration is started even when openvswitch.service is not
present:

https://bugzilla.redhat.com/show_bug.cgi?id=1888017

As a workaround, this patch checks to ensure OVS is installed in
configure-ovs.sh.

Signed-off-by: Tim Rozet trozet@redhat.com

With UPI installs, openvswitch package is not installed until after
upgrade. In the ovs-configuration.service there is a Requires
declaration on openvswitch.service. However due to a bug in systemd,
ovs-configuration is started even when openvswitch.service is not
present:

https://bugzilla.redhat.com/show_bug.cgi?id=1888017

As a workaround, this patch checks to ensure OVS is installed in
configure-ovs.sh.

Signed-off-by: Tim Rozet <trozet@redhat.com>
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. label Oct 13, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@trozet: This pull request references Bugzilla bug 1887040, 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.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1887040: OVS config: check if OVS is installed

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-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Oct 13, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@trozet: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/okd-e2e-aws 6340d5e link /test okd-e2e-aws
ci/prow/e2e-ovn-step-registry 6340d5e link /test e2e-ovn-step-registry

Full PR test history. Your PR dashboard.

Details

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.

@zhaozhanqi
Copy link
Copy Markdown

@trozet I saw 4.6 branch create the file at the begginging touch /var/run/ovs-config-executed
e16d4cd#diff-afb45a3711a77d94f26471d9d94a7f7a03d931d9e72bdf849f2e26e2711d6fd7
this no need for 4.7 version?

set -eux
# Workaround to ensure OVS is installed due to bug in systemd Requires:
# https://bugzilla.redhat.com/show_bug.cgi?id=1888017
if ! rpm -qa | grep -q openvswitch; then
Copy link
Copy Markdown
Contributor

@dcbw dcbw Oct 14, 2020

Choose a reason for hiding this comment

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

@trozet openvswitch2.13 ? But will be fine the way it is.

Copy link
Copy Markdown
Contributor

@sinnykumari sinnykumari Oct 15, 2020

Choose a reason for hiding this comment

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

maybe just use rpm -q openvswitch ? using grep here can also give a match for packages which has openvswitch as sub-string

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we go for rpm -q, it would have to be rpm -q openvswitch2.13 FWIW

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"using grep here can also give a match for packages which has openvswitch as sub-string"

Yeah that was intentional. What if we move to openvswitch2.14 and the package changes names? I don't think that's better. Really openvswitch package should not have the version in its package name, but to workaround this we only look for openvswitch here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sure, if this is preferred way by the OVN team :)

@dcbw
Copy link
Copy Markdown
Contributor

dcbw commented Oct 14, 2020

/lgtm

set -eux
# Workaround to ensure OVS is installed due to bug in systemd Requires:
# https://bugzilla.redhat.com/show_bug.cgi?id=1888017
if ! rpm -qa | grep -q openvswitch; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

how about if ! command-v ovs-vsctl; then ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

missing space, right? if ! command -v ovs-vsctl; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes, indeed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

why is checking for a binary better than checking if the RPM is installed?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I suppose there's an argument that if the package got split and the binary moved to a different package it might be more robust to check the binary itself. That said, if I understand this correctly it's a workaround that only needs to exist for one release, right? After that openvswitch will have been installed and we don't need the check for future upgrades. We shouldn't need to worry about binaries moving around in that case.

I guess the one thorny issue would be if skip-level upgrades need to be supported. I'm pretty sure our IPI templates wouldn't handle that right now, but I don't know what UPI requires.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

if the binary gets split then its even more of an argument not to check for the binary. We need ovs-vswitchd up and running here not just ovs-vsctl binary. I'm going to stick with the ensuring the package is installed since that is actually what we care about for UPI. If openvswitch for some split into multiple packages, then we will need to update this check to look for those packages as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, yeah if the binary is not the thing you care about then that wouldn't make sense. I suppose you could check for ovs-vswitchd instead, but like I said it's a temporary workaround so I'm not inclined to get too hung up on the details.

That said, although I got assigned to this I don't have approval on this repo so this is just my 2 cents anyway. :-)

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 14, 2020
@ashcrow ashcrow requested review from cybertron and removed request for ashcrow October 14, 2020 17:27
@vrutkovs
Copy link
Copy Markdown
Contributor

OKD 4.6 is known to be broken right now (openshift/release#12683 to fix it), so feel free to skip optional tests

@dcbw
Copy link
Copy Markdown
Contributor

dcbw commented Oct 15, 2020

/test e2e-ovn-step-registry

1 similar comment
@dcbw
Copy link
Copy Markdown
Contributor

dcbw commented Oct 15, 2020

/test e2e-ovn-step-registry

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dcbw, sinnykumari, trozet

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 15, 2020
@vrutkovs
Copy link
Copy Markdown
Contributor

/cherry-pick release-4.6

@openshift-cherrypick-robot
Copy link
Copy Markdown

@vrutkovs: once the present PR merges, I will cherry-pick it on top of release-4.6 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.6

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-bot
Copy link
Copy Markdown
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

3 similar comments
@openshift-bot
Copy link
Copy Markdown
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Copy Markdown
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Copy Markdown
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot
Copy link
Copy Markdown
Contributor

@trozet: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-ovn-step-registry 6340d5e link /test e2e-ovn-step-registry
ci/prow/okd-e2e-aws 6340d5e link /test okd-e2e-aws

Full PR test history. Your PR dashboard.

Details

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.

@openshift-merge-robot openshift-merge-robot merged commit 189ac22 into openshift:master Oct 15, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

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

Bugzilla bug 1887040 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1887040: OVS config: check if OVS is installed

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-cherrypick-robot
Copy link
Copy Markdown

@vrutkovs: #2154 failed to apply on top of branch "release-4.6":

Applying: OVS config: check if OVS is installed
Using index info to reconstruct a base tree...
M	templates/common/_base/files/configure-ovs-network.yaml
Falling back to patching base and 3-way merge...
Auto-merging templates/common/_base/files/configure-ovs-network.yaml
CONFLICT (content): Merge conflict in templates/common/_base/files/configure-ovs-network.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 OVS config: check if OVS is installed
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Details

In response to this:

/cherry-pick release-4.6

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.

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-urgent Referenced Bugzilla bug's severity is urgent 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.