Don't use --skip-redirect for cinder restart on rhel6
RHEL6 doesn't support this flag so the restart fails. Not exactly
sure why it is required, seems unchagned from the initial
commit 67787e6b4c6f31388cbee6d83b67371b31c443d4
(found running stack.sh with -e per [1])
[1] https://review.openstack.org/#/c/71996/
Change-Id: Ib34c3663409d7b96b932286cb5a6974e940075d3
diff --git a/lib/cinder b/lib/cinder
index c8c90c0..e8f30b6 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -496,8 +496,12 @@
sudo stop tgt || true
sudo start tgt
elif is_fedora; then
- # bypass redirection to systemctl during restart
- sudo /sbin/service --skip-redirect tgtd restart
+ if [[ $DISTRO =~ (rhel6) ]]; then
+ sudo /sbin/service tgtd restart
+ else
+ # bypass redirection to systemctl during restart
+ sudo /sbin/service --skip-redirect tgtd restart
+ fi
elif is_suse; then
restart_service tgtd
else