Browse code

Merge "Workaround potential failure to shutdown services" into stable/liberty

Jenkins authored on 2015/10/10 06:19:46
Showing 1 changed files
... ...
@@ -1476,6 +1476,12 @@ function stop_process {
1476 1476
         # Kill via pid if we have one available
1477 1477
         if [[ -r $SERVICE_DIR/$SCREEN_NAME/$service.pid ]]; then
1478 1478
             pkill -g $(cat $SERVICE_DIR/$SCREEN_NAME/$service.pid)
1479
+            # TODO(danms): Remove this double-kill when we have
1480
+            # this fixed in all services:
1481
+            # https://bugs.launchpad.net/oslo-incubator/+bug/1446583
1482
+            sleep 1
1483
+            # /bin/true becakse pkill on a non existant process returns an error
1484
+            pkill -g $(cat $SERVICE_DIR/$SCREEN_NAME/$service.pid) || /bin/true
1479 1485
             rm $SERVICE_DIR/$SCREEN_NAME/$service.pid
1480 1486
         fi
1481 1487
         if [[ "$USE_SCREEN" = "True" ]]; then