Start tgtd service after installing the rpm
The later call to tgtadm needs the daemon to be running, and the rpm
package doesn't start it.
Rebased and add a corresponding change for cinder.
Change-Id: Ia72b935575ed8b7c635e8f8edeea835754b2d49f
diff --git a/lib/cinder b/lib/cinder
index f0715a4..5b38719 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -106,6 +106,11 @@
fi
if sudo vgs $VOLUME_GROUP; then
+ if [[ "$os_PACKAGE" = "rpm" ]]; then
+ # RPM doesn't start the service
+ start_service tgtd
+ fi
+
# Remove iscsi targets
sudo tgtadm --op show --mode target | grep $VOLUME_NAME_PREFIX | grep Target | cut -f3 -d ' ' | sudo xargs -n1 tgt-admin --delete || true
# Clean out existing volumes
diff --git a/stack.sh b/stack.sh
index d3de716..e4b7944 100755
--- a/stack.sh
+++ b/stack.sh
@@ -1704,6 +1704,11 @@
fi
if sudo vgs $VOLUME_GROUP; then
+ if [[ "$os_PACKAGE" = "rpm" ]]; then
+ # RPM doesn't start the service
+ start_service tgtd
+ fi
+
# Remove nova iscsi targets
sudo tgtadm --op show --mode target | grep $VOLUME_NAME_PREFIX | grep Target | cut -f3 -d ' ' | sudo xargs -n1 tgt-admin --delete || true
# Clean out existing volumes