Bug 1601795
| Summary: | ovn-controller CLI request - remove chassis from the ovn south database | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Miguel Duarte Barroso <mduarted> |
| Component: | openvswitch | Assignee: | Mark Michelson <mmichels> |
| Status: | CLOSED ERRATA | QA Contact: | haidong li <haili> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 7.5 | CC: | atelang, atragler, ctrautma, danken, haili, igkioka, kfida, mmichels, ovs-qe, qding, tredaelli |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | openvswitch-2.9.0-75.el7fdn | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-01-02 17:54:40 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Miguel Duarte Barroso
2018-07-17 09:12:50 UTC
I think the best way to do this is to add some new flag when exiting the ovn-controller process that allows for the chassis to remain in the southbound database instead of being removed. This way, you can pass this flag in when restarting ovn-controller and not pass this flag in when shutting down ovn-controller. Does this sound like a reasonable approach to you? It does. Thanks for the prompt response. I've posted a patch for review. The first patch allows for you to call `ovs-appctl -t ovn-controller exit --restart` in order to have the exit not clean up databases. The second patch alters ovn-ctl so that if you call `ovn-ctl restart_controller`, then '--restart' is passed to the command to exit ovn-controller. I will update this issue as reviews come in. Apologies, I left the link out of my previous comment: https://patchwork.ozlabs.org/project/openvswitch/list/?series=57394 This patch has been merged upstream in OVS master and 2.10 Dan has asked me to clarify what was added for QE's benefit. The change added makes it so that you can optionally stop ovn-controller without tearing down tunnels. You can do this in one of two ways: `ovs-appctl -t ovn-controller exit --restart` This will exit ovn-controller and not tear down its tunnels. When you start ovn-controller back up again, it will start back up smoothly and re-use what it had already created. The other thing you can do is to issue: `ovn-ctl restart_controller` This will issue the previous ovs-appctl command and then start ovn-controller again. It is a shortcut method for issuing the stop and start manually. Any other methods used to stop the ovn-controller (e.g. initd or systemctl) will not pass the --restart flag and will still tear down tunnels. Hi Mark,I met some issue when I test the command "ovn-ctl restart_controller",the ovn-controller can't be up after it.Is there any configuration I missed? [root@dell-per730-19 scripts]# ./ovn-ctl restart_controller Exiting ovn-controller (113959) [ OK ] Starting ovn-controller [ OK ] [root@dell-per730-19 ~]# systemctl status ovn-controller ● ovn-controller.service - OVN controller daemon Loaded: loaded (/usr/lib/systemd/system/ovn-controller.service; disabled; vendor preset: disabled) Active: inactive (dead) Nov 22 04:07:13 dell-per730-19.rhts.eng.pek2.redhat.com systemd[1]: Starting ... Nov 22 04:07:13 dell-per730-19.rhts.eng.pek2.redhat.com ovn-ctl[22868]: Start... Nov 22 04:07:13 dell-per730-19.rhts.eng.pek2.redhat.com systemd[1]: Started O... Nov 22 04:28:08 dell-per730-19.rhts.eng.pek2.redhat.com systemd[1]: Stopping ... Nov 22 04:28:08 dell-per730-19.rhts.eng.pek2.redhat.com ovn-ctl[100063]: Exit... Nov 22 04:28:08 dell-per730-19.rhts.eng.pek2.redhat.com systemd[1]: Stopped O... Nov 22 04:30:39 dell-per730-19.rhts.eng.pek2.redhat.com systemd[1]: Starting ... Nov 22 04:30:39 dell-per730-19.rhts.eng.pek2.redhat.com ovn-ctl[113947]: Star... Nov 22 04:30:39 dell-per730-19.rhts.eng.pek2.redhat.com systemd[1]: Started O... Nov 22 04:54:56 dell-per730-19.rhts.eng.pek2.redhat.com ovn-ctl[43269]: ovn-c... Hint: Some lines were ellipsized, use -l to show in full. [root@dell-per730-19 scripts]# systemctl start ovn-controller Job for ovn-controller.service failed because the control process exited with error code. See "systemctl status ovn-controller.service" and "journalctl -xe" for details. I think there is probably a mismatch in state between the actual state of ovn-controller and systemd. If you started ovn-controller using systemd, and then you run ovn-ctl restart_controller, then systemd is probably unaware that ovn-controller was restarted. systemd does not make it easy to specify a custom method for restarting a service. You can specify how to stop a service and how to start a service. When you issue a `systemctl restart`, it stops the service and starts the service again. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0014 |