From 6bc089fce03e1b29405224eeed4761f08339255a Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 1 Jun 2015 12:39:12 +0200 Subject: [PATCH] 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 --- lib/cinder | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/cinder b/lib/cinder index b8cf8090dc..ade3b82c3a 100644 --- a/lib/cinder +++ b/lib/cinder @@ -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