From 07da3e3a3f13ffff7b75aa856c782481606e1e23 Mon Sep 17 00:00:00 2001 From: Vladislav Odintsov Date: Mon, 27 Feb 2023 21:41:17 +0300 Subject: [PATCH] rhel: pass options to stop daemon command in systemd units This patch fixes ovn-northd.service and ovn-db@.service systemd units which didn't pass startup options to ovn-ctl script while stop_* call. For instance if ovn-northd service was started with option '--ovn-manage-ovsdb=no' and NB/SB databases are located on the same host and started by ovn-db@nb / ovn-db@sb or manually with ovn-ctl, so ovsdb-server processes for these services will be unexpectedly stopped. Fixes: 497ec3fdfbdb ("rhel: add ovn-db@.service systemd-unit") Signed-off-by: Vladislav Odintsov Acked-by: Ales Musil Signed-off-by: Dumitru Ceara --- rhel/usr_lib_systemd_system_ovn-db@.service | 2 +- rhel/usr_lib_systemd_system_ovn-northd.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rhel/usr_lib_systemd_system_ovn-db@.service b/rhel/usr_lib_systemd_system_ovn-db@.service index 98556a6737..c835e4967c 100644 --- a/rhel/usr_lib_systemd_system_ovn-db@.service +++ b/rhel/usr_lib_systemd_system_ovn-db@.service @@ -33,7 +33,7 @@ EnvironmentFile=-/etc/sysconfig/ovn-%i ExecStartPre=-/usr/bin/chown -R ${OVN_USER_ID} ${OVN_DBDIR} ExecStart=/usr/share/ovn/scripts/ovn-ctl \ --ovn-user=${OVN_USER_ID} start_%i_ovsdb $OPTIONS $ovn_%i_opts -ExecStop=/usr/share/ovn/scripts/ovn-ctl stop_%i_ovsdb +ExecStop=/usr/share/ovn/scripts/ovn-ctl stop_%i_ovsdb $OPTIONS $ovn_%i_opts [Install] WantedBy=multi-user.target diff --git a/rhel/usr_lib_systemd_system_ovn-northd.service b/rhel/usr_lib_systemd_system_ovn-northd.service index d281f861c0..6c4c6621c1 100644 --- a/rhel/usr_lib_systemd_system_ovn-northd.service +++ b/rhel/usr_lib_systemd_system_ovn-northd.service @@ -26,7 +26,7 @@ EnvironmentFile=-/etc/sysconfig/ovn-northd ExecStartPre=-/usr/bin/chown -R ${OVN_USER_ID} ${OVN_DBDIR} ExecStart=/usr/share/ovn/scripts/ovn-ctl \ --ovn-user=${OVN_USER_ID} start_northd $OVN_NORTHD_OPTS -ExecStop=/usr/share/ovn/scripts/ovn-ctl stop_northd +ExecStop=/usr/share/ovn/scripts/ovn-ctl stop_northd $OVN_NORTHD_OPTS [Install] WantedBy=multi-user.target