Startup race condition?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm writing documentation and lab exercises on stgt for our Guru Labs
Linux training courses. We try to document and show best practices in
our courseware.

I was looking at the initd.sample file and I see this code:

        # Start tgtd first.
        tgtd &>/dev/null
        RETVAL=$?
        if [ "$RETVAL" -ne 0 ] ; then
            echo "Could not start tgtd (is tgtd already running?)"
            exit 1
        fi
        # Put tgtd into "offline" state until all the targets are configured.
        # We don't want initiators to (re)connect and fail the connection
        # if it's not ready.
        tgtadm --op update --mode sys --name State -v offline

Is there a race condition between the initial starting of tgtd telling
it to go into the offline state?

If so, how about adding a --start-offline or equivalent to the tgtd
binary?

Thanks,
Dax Kelson
Guru Labs

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux