diff --git a/scripts/tgtd.service b/scripts/tgtd.service index 9884201f..63b346b1 100644 --- a/scripts/tgtd.service +++ b/scripts/tgtd.service @@ -9,6 +9,9 @@ ConditionPathExists=/etc/tgt/targets.conf Environment=TGTD_CONFIG=/etc/tgt/targets.conf ExecStart=/usr/sbin/tgtd --foreground +# Wait for tgtd to be ready +# See https://bugzilla.redhat.com/show_bug.cgi?id=848942 +ExecStartPost=/usr/sbin/sleep 5 ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -value offline ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -value ready ExecStartPost=/usr/sbin/tgt-admin --verbose --execute --conf ${TGTD_CONFIG}