From 0230aa899bb6900ca5c343d6360e79e205ac8f2c Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Thu, 14 Jun 2012 08:51:01 +0200 Subject: [PATCH] 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 --- lib/cinder | 5 +++++ stack.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/cinder b/lib/cinder index f0715a4d9f..5b38719a16 100644 --- a/lib/cinder +++ b/lib/cinder @@ -106,6 +106,11 @@ function init_cinder() { 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 d3de7162f2..e4b79448f7 100755 --- a/stack.sh +++ b/stack.sh @@ -1704,6 +1704,11 @@ elif is_service_enabled n-vol; then 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