diff --git a/files/apts/n-vol b/files/apts/n-vol index edaee2c898..5db06eac99 100644 --- a/files/apts/n-vol +++ b/files/apts/n-vol @@ -1,3 +1,2 @@ -iscsitarget # NOPRIME -iscsitarget-dkms # NOPRIME +tgt lvm2 diff --git a/stack.sh b/stack.sh index c4655e75f4..1fc49facf8 100755 --- a/stack.sh +++ b/stack.sh @@ -1053,7 +1053,8 @@ if [[ "$ENABLED_SERVICES" =~ "n-vol" ]]; then # # By default, the backing file is 2G in size, and is stored in /opt/stack. - apt_get install iscsitarget-dkms iscsitarget + # install the package + apt_get install tgt if ! sudo vgs $VOLUME_GROUP; then VOLUME_BACKING_FILE=${VOLUME_BACKING_FILE:-$DEST/nova-volumes-backing-file} @@ -1080,9 +1081,10 @@ if [[ "$ENABLED_SERVICES" =~ "n-vol" ]]; then done fi - # Configure iscsitarget - sudo sed 's/ISCSITARGET_ENABLE=false/ISCSITARGET_ENABLE=true/' -i /etc/default/iscsitarget - sudo /etc/init.d/iscsitarget restart + # tgt in oneiric doesn't restart properly if tgtd isn't running + # do it in two steps + sudo stop tgt || true + sudo start tgt fi function add_nova_flag { @@ -1112,6 +1114,8 @@ fi if [[ "$ENABLED_SERVICES" =~ "n-vol" ]]; then add_nova_flag "--volume_group=$VOLUME_GROUP" add_nova_flag "--volume_name_template=${VOLUME_NAME_PREFIX}%08x" + # oneiric no longer supports ietadm + add_nova_flag "--iscsi_helper=tgtadm" fi add_nova_flag "--my_ip=$HOST_IP" add_nova_flag "--public_interface=$PUBLIC_INTERFACE"