qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: Eric Blake <eblake@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org, kwolf@redhat.com
Subject: Re: RFC: towards systemd socket activation in q-s-d
Date: Mon, 30 Jan 2023 15:51:52 +0000	[thread overview]
Message-ID: <Y9fnmIDV3gh5e9o7@redhat.com> (raw)
In-Reply-To: <20230130154448.GS7636@redhat.com>

On Mon, Jan 30, 2023 at 03:44:48PM +0000, Richard W.M. Jones wrote:
> On Mon, Jan 30, 2023 at 02:58:01PM +0000, Daniel P. Berrangé wrote:
> > Obviously at startup QEMU can trivially inherit the FDs from whatever
> > spawned it. The only task is to identify the FDs that are passed into,
> > and systemd defined a mechanism for this using LISTEN_FDNAMES. IOW the
> > socket activation can fully replace 'getfd' for purpose of initial
> > startup. This will get rid of the annoying difference that SocketAddress
> > only allows numeric FDs at startup and named FDs at runtime, by making
> > named FDs the consistent standard. We could thus deprecate the use of
> > non-named numeric FDs in SocketAddress to improve our sanity.
> > 
> > The question is how to define semantics for the LISTEN_FDNAMES while
> > also still remaining back compat with the existing QEMU utilities
> > that allow socket activation. Some kind of naming scheme would need
> > to be decided upon, as well as handling the use of activation without
> > LISTEN_FDNAMES being set. 
> 
> If I understand LISTEN_FDNAMES correctly, it's the names of the
> protocols to be used (rather clumsily expressed through IANA
> registered names from /etc/services).  It would be valid to use
> LISTEN_FDNAMES=http:http for example, for a service that must use HTTP
> on both sockets.

That's not accurate, it is not related to IANA service names.

> In other words it's not just names of file descriptors that you can
> make up.

By default the FD name matches the name of the systemd .socket unit
file, but it can be set to an arbitrary string using FileDescriptorName=.
It is upto the application to decide if it wants to require specific
file naming schemes, or is happy to receive the default system .socket
based names.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2023-01-30 15:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 21:26 RFC: towards systemd socket activation in q-s-d Eric Blake
2023-01-28  7:49 ` Richard W.M. Jones
2023-01-30 14:58 ` Daniel P. Berrangé
2023-01-30 15:44   ` Richard W.M. Jones
2023-01-30 15:51     ` Daniel P. Berrangé [this message]
2023-01-30 16:45   ` Daniel P. Berrangé
2023-01-30 16:55     ` Richard W.M. Jones
2023-01-31 11:17   ` Kevin Wolf
2023-01-31 11:29     ` Daniel P. Berrangé

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=Y9fnmIDV3gh5e9o7@redhat.com \
    --to=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    /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 NNTP newsgroup(s).