Cinder: On SUSE, avoid restarting tgt

There is a known bug that restart tgtd fails, so go the
workaround way and stopping/starting it instead.

In addition, remove the else case since unstack also
uses cleanup_cinder, which already unconditionally supports
all distros.

Change-Id: Ib70917a95f001ef36a51815f08416fa30084aad6
This commit is contained in:
Dirk Mueller 2015-06-01 12:39:12 +02:00
parent 7a6f0b6bff
commit 6bc089fce0

View File

@ -432,12 +432,13 @@ function start_cinder {
_configure_tgt_for_config_d
if is_ubuntu; then
sudo service tgt restart
elif is_fedora || is_suse; then
restart_service tgtd
elif is_suse; then
# NOTE(dmllr): workaround restart bug
# https://bugzilla.suse.com/show_bug.cgi?id=934642
stop_service tgtd
start_service tgtd
else
# note for other distros: unstack.sh also uses the tgt/tgtd service
# name, and would need to be adjusted too
exit_distro_not_supported "restarting tgt"
restart_service tgtd
fi
# NOTE(gfidente): ensure tgtd is running in debug mode
sudo tgtadm --mode system --op update --name debug --value on