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
This commit is contained in:
parent
bff593d928
commit
0230aa899b
@ -106,6 +106,11 @@ function init_cinder() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if sudo vgs $VOLUME_GROUP; then
|
if sudo vgs $VOLUME_GROUP; then
|
||||||
|
if [[ "$os_PACKAGE" = "rpm" ]]; then
|
||||||
|
# RPM doesn't start the service
|
||||||
|
start_service tgtd
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove iscsi targets
|
# 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
|
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
|
# Clean out existing volumes
|
||||||
|
5
stack.sh
5
stack.sh
@ -1704,6 +1704,11 @@ elif is_service_enabled n-vol; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if sudo vgs $VOLUME_GROUP; then
|
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
|
# 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
|
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
|
# Clean out existing volumes
|
||||||
|
Loading…
Reference in New Issue
Block a user