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
| ... | ... |
@@ -106,6 +106,11 @@ function init_cinder() {
|
| 106 | 106 |
fi |
| 107 | 107 |
|
| 108 | 108 |
if sudo vgs $VOLUME_GROUP; then |
| 109 |
+ if [[ "$os_PACKAGE" = "rpm" ]]; then |
|
| 110 |
+ # RPM doesn't start the service |
|
| 111 |
+ start_service tgtd |
|
| 112 |
+ fi |
|
| 113 |
+ |
|
| 109 | 114 |
# Remove iscsi targets |
| 110 | 115 |
sudo tgtadm --op show --mode target | grep $VOLUME_NAME_PREFIX | grep Target | cut -f3 -d ' ' | sudo xargs -n1 tgt-admin --delete || true |
| 111 | 116 |
# Clean out existing volumes |
| ... | ... |
@@ -1704,6 +1704,11 @@ elif is_service_enabled n-vol; then |
| 1704 | 1704 |
fi |
| 1705 | 1705 |
|
| 1706 | 1706 |
if sudo vgs $VOLUME_GROUP; then |
| 1707 |
+ if [[ "$os_PACKAGE" = "rpm" ]]; then |
|
| 1708 |
+ # RPM doesn't start the service |
|
| 1709 |
+ start_service tgtd |
|
| 1710 |
+ fi |
|
| 1711 |
+ |
|
| 1707 | 1712 |
# Remove nova iscsi targets |
| 1708 | 1713 |
sudo tgtadm --op show --mode target | grep $VOLUME_NAME_PREFIX | grep Target | cut -f3 -d ' ' | sudo xargs -n1 tgt-admin --delete || true |
| 1709 | 1714 |
# Clean out existing volumes |