Steven Dake 4008ca8619 Start tgtd in cinder-volume container
The tgtd process was not being started in the cinder-volume container.
This results in iSCSI not being avialable for Cinder to operate
against.  Unfortunately cinder doesn't report the problem because LVM
is responsible for the iSCSI mapping.

Co-Authored-By: Ryan Hallisey <rhallise@redhat.com>

Closes-Bug: 1473090
Closes-Bug: 1469323
Change-Id: Ie3403c5c3f81beb48960e838b4274e0c5796e387
2015-07-15 10:35:31 -04:00

18 lines
351 B
Bash
Executable File

#!/bin/bash
set -e
DESC="target framework daemon"
DAEMON=/usr/sbin/tgtd
TGTD_CONFIG=/etc/tgt/targets.conf
echo "Starting tgtd $DESC"
/usr/sbin/tgtd
echo "Set to offline"
tgtadm --op update --mode sys --name State -v offline
echo "Set tgt config"
tgt-admin -e -c $TGTD_CONFIG
echo "Set to ready"
tgtadm --op update --mode sys --name State -v ready