Skip to content

Commit

Permalink
rhel: pass options to stop daemon command in systemd units
Browse files Browse the repository at this point in the history
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: 497ec3f ("rhel: add ovn-db@.service systemd-unit")
Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
Acked-by: Ales Musil <amusil@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
  • Loading branch information
odivlad authored and dceara committed Mar 8, 2023
1 parent 6d59ad9 commit 07da3e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rhel/usr_lib_systemd_system_ovn-db@.service
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion rhel/usr_lib_systemd_system_ovn-northd.service
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 07da3e3

Please sign in to comment.