Message ID | 20230227184117.3703319-1-odivlad@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] rhel: pass options to stop daemon command in systemd units | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_ovn-kubernetes | fail | github build: failed |
On Mon, Feb 27, 2023 at 7:41 PM Vladislav Odintsov <odivlad@gmail.com> wrote: > 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 <odivlad@gmail.com> > --- > 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 98556a673..c835e4967 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 d281f861c..6c4c6621c 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 > -- > 2.36.1 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > Looks good to me, thanks. Acked-by: Ales Musil <amusil@redhat.com>
On 3/7/23 10:19, Ales Musil wrote: > On Mon, Feb 27, 2023 at 7:41 PM Vladislav Odintsov <odivlad@gmail.com> > wrote: > >> 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 <odivlad@gmail.com> >> --- [...] > Looks good to me, thanks. > > Acked-by: Ales Musil <amusil@redhat.com> > Thanks, Vladislav and Ales! I applied this to the main branch and backported it to 23.03. Regards, Dumitru
Thanks Dumitru! > On 8 Mar 2023, at 15:45, Dumitru Ceara <dceara@redhat.com> wrote: > > On 3/7/23 10:19, Ales Musil wrote: >> On Mon, Feb 27, 2023 at 7:41 PM Vladislav Odintsov <odivlad@gmail.com> >> wrote: >> >>> 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 <odivlad@gmail.com> >>> --- > > [...] > >> Looks good to me, thanks. >> >> Acked-by: Ales Musil <amusil@redhat.com> >> > > Thanks, Vladislav and Ales! > > I applied this to the main branch and backported it to 23.03. > > Regards, > Dumitru > Regards, Vladislav Odintsov
diff --git a/rhel/usr_lib_systemd_system_ovn-db@.service b/rhel/usr_lib_systemd_system_ovn-db@.service index 98556a673..c835e4967 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 d281f861c..6c4c6621c 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
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 <odivlad@gmail.com> --- 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(-)