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

[WIP] Start host openvswitch using systemctl #477

Closed
wants to merge 2 commits into from

Conversation

mccv1r0
Copy link
Contributor

@mccv1r0 mccv1r0 commented Feb 14, 2020

Start host openvswitch using systemctl

Signed-off-by: Michael Cambria mcambria@redhat.com

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 14, 2020
@openshift-ci-robot
Copy link
Contributor

Hi @mccv1r0. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@dcbw
Copy link
Contributor

dcbw commented Feb 15, 2020

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 15, 2020
@dcbw
Copy link
Contributor

dcbw commented Feb 15, 2020

/retest

2 similar comments
@mccv1r0
Copy link
Contributor Author

mccv1r0 commented Feb 16, 2020

/retest

@dcbw
Copy link
Contributor

dcbw commented Feb 17, 2020

/retest

@mccv1r0
Copy link
Contributor Author

mccv1r0 commented Feb 17, 2020

/test e2e-gcp-ovn

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 24, 2020
@mccv1r0
Copy link
Contributor Author

mccv1r0 commented Mar 2, 2020

/retest

@mccv1r0
Copy link
Contributor Author

mccv1r0 commented Mar 20, 2020

/test e2e-gcp-ovn

@mccv1r0 mccv1r0 force-pushed the sdn-702 branch 4 times, most recently from 831d382 to 6c80243 Compare March 24, 2020 18:48
@mccv1r0
Copy link
Contributor Author

mccv1r0 commented Mar 24, 2020

/test e2e-gcp-ovn

@mccv1r0 mccv1r0 force-pushed the sdn-702 branch 4 times, most recently from db927b0 to f1ecb44 Compare March 27, 2020 18:10
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 27, 2020
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 27, 2020
@@ -42,23 +42,75 @@ spec:
- |
#!/bin/bash
set -euo pipefail
set -x
if [[ -f /usr/bin/id ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

-x for executable?

I don't understand all these checks, they are not atomic and thus worse than redundant because they hid the real error message.

/usr/bin/id openvswitch || true

Copy link
Contributor

Choose a reason for hiding this comment

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

or no || true with the set -e

Copy link
Contributor

Choose a reason for hiding this comment

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

or I guess it's not clear in which environment id is not present?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand all these checks, they are not atomic and thus worse than redundant because they hid the real error message.

Most (if not all) of these checks were added to debug and will not exist in the final PR.

echo "id command not found"
fi
if [[ -d /run/openvswitch ]]; then
ls -al /run/openvswitch
Copy link
Contributor

Choose a reason for hiding this comment

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

ls -al /run/openvswitch/ || true trailing / forces treating it as a directory.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess question here as well, when is /var/run not a symlink to /run ?

if [[ -d /var/run/openvswitch ]]; then
ls -al /var/run/openvswitch
fi
if [[ -f /var/run/openvswitch/ovs-vswitchd.pid ]] ; then
Copy link
Contributor

Choose a reason for hiding this comment

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

-r for readable.

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mccv1r0
To complete the pull request process, please assign dcbw
You can assign the PR to them by writing /assign @dcbw in a comment when ready.

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

@cgwalters
Copy link
Member

@sinnykumari
Copy link

can we get this PR rebased, wanted to test this with openshift/machine-config-operator#1636?

@runcom
Copy link
Member

runcom commented Jun 16, 2020

@sinnykumari I think this is rebased now but not sure about all these failures in CI

journalctl -xeu openvswitch --no-pager
else
echo "OVS started by ovs-node container, NOT RHCOS"
# Need container up v0.0 just to see if host starts ovs and friends
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you fix the indentation here?

if (systemctl is-active --quiet openvswitch) ; then
echo "OVS started by RHCOS"
systemctl is-active openvswitch
journalctl -xeu openvswitch --no-pager
Copy link
Contributor

@squeed squeed Jun 16, 2020

Choose a reason for hiding this comment

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

Probably just want to exec journalctl -f -u openvswitch ovsdb-server and be done with the script.

@sinnykumari
Copy link

@sinnykumari I think this is rebased now but not sure about all these failures in CI

Can it because we would need openshift/machine-config-operator#1636 merged first so that ovn related services are enabled on host to keep cluster install progressing further?

fi
if [[ -f /var/run/openvswitch/ovsdb-server.pid ]] ; then
cat /var/run/openvswitch/ovsdb-server.pid
fi
function quit {
Copy link
Contributor

Choose a reason for hiding this comment

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

Yikes. This needs to be moved to the "non-systemd case"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is all debug code

Copy link
Contributor

Choose a reason for hiding this comment

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

not the kill -9...

Signed-off-by: Michael Cambria <mcambria@redhat.com>
Signed-off-by: Michael Cambria <mcambria@redhat.com>
journalctl -xeu openvswitch --no-pager
else
echo "OVS started by ovs-node container, NOT RHCOS"
# Need container up v0.0 just to see if host starts ovs and friends
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really understand why we need to start OVS from this container. Shouldn't systemd OVS be configured as a service with restart=Always? Why does a pod need to start it?

Copy link
Contributor

Choose a reason for hiding this comment

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

This might have been left-over from before the MCO was going to start OVS. Our first pass was starting system OVS from a pod via systemctl without MCO, but we moved to MCO because Clayton told us to.

@openshift-ci-robot
Copy link
Contributor

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

Test name Commit Details Rerun command
ci/prow/e2e-aws-ovn 32531fa link /test e2e-aws-ovn
ci/prow/e2e-aws-sdn-multi 7895421 link /test e2e-aws-sdn-multi
ci/prow/e2e-windows-hybrid-network 7895421 link /test e2e-windows-hybrid-network
ci/prow/e2e-gcp-ovn 7895421 link /test e2e-gcp-ovn
ci/prow/e2e-ovn-step-registry 7895421 link /test e2e-ovn-step-registry
ci/prow/e2e-ovn-hybrid-step-registry 7895421 link /test e2e-ovn-hybrid-step-registry
ci/prow/e2e-vsphere 7895421 link /test e2e-vsphere
ci/prow/e2e-metal-ipi 7895421 link /test e2e-metal-ipi
ci/prow/e2e-upgrade 7895421 link /test e2e-upgrade
ci/prow/e2e-metal-ipi-ovn-ipv6 7895421 link /test e2e-metal-ipi-ovn-ipv6

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.

@openshift-merge-robot
Copy link
Contributor

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

Test name Commit Details Rerun command
ci/prow/e2e-aws-ovn-windows 7895421 link /test e2e-aws-ovn-windows

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.

@squeed squeed closed this Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet