[stgt] Startup race condition?

Dax Kelson dkelson at gurulabs.com
Sun Mar 28 23:55:02 CEST 2010


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
        if [ "$RETVAL" -ne 0 ] ; then
            echo "Could not start tgtd (is tgtd already running?)"
            exit 1
        # 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

Dax Kelson
Guru Labs

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

More information about the stgt mailing list