stgt.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Forza <forza@tnonline.net>
To: stgt@vger.kernel.org
Subject: Daemon not immediately available after start.
Date: Tue, 22 Aug 2023 14:14:04 +0200 (GMT+02:00)	[thread overview]
Message-ID: <ffaa7cb.1727b74a.18a1d2a93f0@tnonline.net> (raw)

Hi,

I have taken over as maintainer for the tgt package (scsi-tgt) in Alpine Linux.

On Alpine we like to split packages to keep their footprint small. I have written an init script in two parts, one for the tgtd daemon and one for tgt-admin that loads the config file. I assume some people use tgtadm directly instead of tgt-admin and the config files.

I have one issue during launch of the tgtd, which is that it starts and returns ok to init system, which now tries to load the config via tgt-admin. This, however, sometimes fails. I saw that the same issue was documented in Gentoo, which solved the issue by adding a one second delay after starting tgtd, before issuing tgtadm or tgt-admin commands.

I think this is not an ideal situation as it is conceivable that an initiator tries to connect during that second, but finds an empty target.

Is there a good solution for this? 
* can tgtd wait until it is fully ready for connections from tgtadm before returning to shell/init system?
* or can tgtd start in offline mofd, and we can keep the one second delay before activating again via tgtadm?

Thanks,

~ Forza

                 reply	other threads:[~2023-08-22 12:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ffaa7cb.1727b74a.18a1d2a93f0@tnonline.net \
    --to=forza@tnonline.net \
    --cc=stgt@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).