Browse code

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

Dirk Mueller authored on 2015/06/01 19:39:12
Showing 1 changed files
... ...
@@ -432,12 +432,13 @@ function start_cinder {
432 432
             _configure_tgt_for_config_d
433 433
             if is_ubuntu; then
434 434
                 sudo service tgt restart
435
-            elif is_fedora || is_suse; then
436
-                restart_service tgtd
435
+            elif is_suse; then
436
+                # NOTE(dmllr): workaround restart bug
437
+                # https://bugzilla.suse.com/show_bug.cgi?id=934642
438
+                stop_service tgtd
439
+                start_service tgtd
437 440
             else
438
-                # note for other distros: unstack.sh also uses the tgt/tgtd service
439
-                # name, and would need to be adjusted too
440
-                exit_distro_not_supported "restarting tgt"
441
+                restart_service tgtd
441 442
             fi
442 443
             # NOTE(gfidente): ensure tgtd is running in debug mode
443 444
             sudo tgtadm --mode system --op update --name debug --value on