Bug 1887040: OVS config: check if OVS is installed#2154
Bug 1887040: OVS config: check if OVS is installed#2154openshift-merge-robot merged 1 commit intoopenshift:masterfrom
Conversation
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>
|
@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
DetailsIn 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. |
|
@trozet: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
@trozet I saw 4.6 branch create the file at the begginging |
| 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 |
There was a problem hiding this comment.
@trozet openvswitch2.13 ? But will be fine the way it is.
There was a problem hiding this comment.
maybe just use rpm -q openvswitch ? using grep here can also give a match for packages which has openvswitch as sub-string
There was a problem hiding this comment.
If we go for rpm -q, it would have to be rpm -q openvswitch2.13 FWIW
There was a problem hiding this comment.
"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.
There was a problem hiding this comment.
sure, if this is preferred way by the OVN team :)
|
/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 |
There was a problem hiding this comment.
how about if ! command-v ovs-vsctl; then ?
There was a problem hiding this comment.
missing space, right? if ! command -v ovs-vsctl; then
There was a problem hiding this comment.
why is checking for a binary better than checking if the RPM is installed?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. :-)
|
OKD 4.6 is known to be broken right now (openshift/release#12683 to fix it), so feel free to skip optional tests |
|
/test e2e-ovn-step-registry |
1 similar comment
|
/test e2e-ovn-step-registry |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherry-pick release-4.6 |
|
@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. DetailsIn 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. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@trozet: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
@trozet: All pull requests linked via external trackers have merged: Bugzilla bug 1887040 has been moved to the MODIFIED state. DetailsIn 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. |
|
@vrutkovs: #2154 failed to apply on top of branch "release-4.6": DetailsIn 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. |
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