search for: listen_fdnames

Displaying 20 results from an estimated 23 matches for "listen_fdnames".

2023 Mar 24
4
[libnbd PATCH v3 19/19] socket activation: set LISTEN_FDNAMES
On 3/23/23 20:27, Eric Blake wrote: > On Thu, Mar 23, 2023 at 01:10:16PM +0100, Laszlo Ersek wrote: >> When the user calls nbd_set_socket_activation_name before calling >> nbd_connect_system_socket_activation, pass the name down to the server >> through LISTEN_FDNAMES. This has no effect unless the new API has >> been called to set the socket name to a non-empty string. >> >> https://lists.nongnu.org/archive/html/qemu-devel/2023-01/msg06114.html >> >> [Original commit message and upstream discussion reference by Rich Jones; >&gt...
2023 Jan 30
2
[PATCH libnbd v2 4/4] generator/states-connect-socket-activation.c: Set LISTEN_FDNAMES
When the user calls nbd_set_socket_activation_name before calling nbd_connect_system_socket_activation, pass the name down to the server through LISTEN_FDNAMES. This has no effect unless the new API has been called to set the socket name to a non-empty string. --- generator/states-connect-socket-activation.c | 35 +++++++++++++++----- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/generator/states-connect-socket-activation.c b/generator/...
2023 Mar 23
1
[libnbd PATCH v3 19/19] socket activation: set LISTEN_FDNAMES
On Thu, Mar 23, 2023 at 01:10:16PM +0100, Laszlo Ersek wrote: > When the user calls nbd_set_socket_activation_name before calling > nbd_connect_system_socket_activation, pass the name down to the server > through LISTEN_FDNAMES. This has no effect unless the new API has > been called to set the socket name to a non-empty string. > > https://lists.nongnu.org/archive/html/qemu-devel/2023-01/msg06114.html > > [Original commit message and upstream discussion reference by Rich Jones; > at > <https://...
2023 Mar 24
2
[libnbd PATCH v3 19/19] socket activation: set LISTEN_FDNAMES
...t;, &pid_ofs); > >> SACT_VAR_PUSH (sact_var, &num_vars, > >> "LISTEN_FDS=", "1", NULL); > >> + if (h->sact_name != NULL) > >> + SACT_VAR_PUSH (sact_var, &num_vars, > >> + "LISTEN_FDNAMES=", h->sact_name, NULL); > >> if (prepare_socket_activation_environment (&env, sact_var, num_vars) == -1) > > > > If I'm reading this correctly, this does wipe an inherited > > LISTEN_FDNAMES from the environment in the case where the application > &g...
2023 Jan 28
1
[PATCH libnbd] generator: Pass LISTEN_FDNAMES=nbd with systemd socket activation
...es the current environment and copies it. Removes - * any existing LISTEN_PID or LISTEN_FDS and replaces them with new - * variables. env[0] is "LISTEN_PID=..." which is filled in by - * CONNECT_SA.START, and env[1] is "LISTEN_FDS=1". + * any existing LISTEN_PID, LISTEN_FDS or LISTEN_FDNAMES, and replaces + * them with new variables. + * + * env[0] is "LISTEN_PID=..." which is filled in by CONNECT_SA.START + * + * env[1] is "LISTEN_FDS=1" + * + * env[2] is "LISTEN_FDNAMES=nbd" */ static int prepare_socket_activation_environment (string_vector *env) @@...
2023 Mar 25
4
[libnbd PATCH v5 0/4] pass LISTEN_FDNAMES with systemd socket activation
...as here (incorrectly versioned on the mailing list as v3): <http://mid.mail-archive.com/20230323121016.1442655-1-lersek at redhat.com>. See the Notes section on each patch for the v5 updates. Laszlo Ersek (2): socket activation: generalize environment construction socket activation: set LISTEN_FDNAMES Richard W.M. Jones (2): common/include: Copy ascii-ctype functions from nbdkit generator: Add APIs to get/set the socket activation socket name .gitignore | 1 + common/include/Makefile.am | 6 + common/include/ascii-ctype.h...
2023 Jan 31
1
[PATCH libnbd] generator: Pass LISTEN_FDNAMES=nbd with systemd socket activation
...onment and copies it. Removes > - * any existing LISTEN_PID or LISTEN_FDS and replaces them with new > - * variables. env[0] is "LISTEN_PID=..." which is filled in by > - * CONNECT_SA.START, and env[1] is "LISTEN_FDS=1". > + * any existing LISTEN_PID, LISTEN_FDS or LISTEN_FDNAMES, and replaces > + * them with new variables. > + * > + * env[0] is "LISTEN_PID=..." which is filled in by CONNECT_SA.START > + * > + * env[1] is "LISTEN_FDS=1" > + * > + * env[2] is "LISTEN_FDNAMES=nbd" > */ > static int > prepare_sock...
2023 Jan 30
4
[PATCH libnbd v2 0/4] Pass LISTEN_FDNAMES with systemd socket activation
This is an alternative approach to https://listman.redhat.com/archives/libguestfs/2023-January/030535.html After discussing this with Dan Berrange we came to the conclusion that you really might want to set LISTEN_FDNAMES to arbitrary short strings (or not set it). Especially when talking to qemu-storage-daemon which would allow you to use these names on the command line. Rich.
2023 Feb 15
1
[libnbd PATCH v3 29/29] socket activation: set LISTEN_FDNAMES
For #26, #27, #28, #29: Reviewed-by: Richard W.M. Jones <rjones at redhat.com> -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests.
2023 Mar 23
1
[libnbd PATCH v3 00/19] pass LISTEN_FDNAMES with systemd socket activation
On 3/23/23 13:09, Laszlo Ersek wrote: > V3 was here: > <http://mid.mail-archive.com/20230215141158.2426855-1-lersek at redhat.com>. Meh, *this* version is of course v4. I updated everything in my git-format-series command line, from my bash history, from the time of posting v3, *except* of course the "-v3" option... Laszlo
2023 Jan 31
1
[PATCH libnbd] generator: Pass LISTEN_FDNAMES=nbd with systemd socket activation
.... Removes > > - * any existing LISTEN_PID or LISTEN_FDS and replaces them with new > > - * variables. env[0] is "LISTEN_PID=..." which is filled in by > > - * CONNECT_SA.START, and env[1] is "LISTEN_FDS=1". > > + * any existing LISTEN_PID, LISTEN_FDS or LISTEN_FDNAMES, and replaces > > + * them with new variables. > > + * > > + * env[0] is "LISTEN_PID=..." which is filled in by CONNECT_SA.START > > + * > > + * env[1] is "LISTEN_FDS=1" > > + * > > + * env[2] is "LISTEN_FDNAMES=nbd" > >...
2023 May 07
2
[PATCH libnbd] tests: Add a test of nbd_{set, get}_socket_activation_name
...heck we can set it to something and read that back. */ + assert (nbd_set_socket_activation_name (nbd, "hello") == 0); + r = nbd_get_socket_activation_name (nbd); + assert (r != NULL); + assert (strcmp (r, "hello") == 0); + free (r); + + /* Run external nbdkit and check the LISTEN_FDNAMES environment + * variable is set. We need to capture the debug output of nbdkit, + * hence the journey through the shell. + */ + unlink (DEBUG_FILE); + char *cmd[] = { + "sh", "-c", + "exec 2> " DEBUG_FILE "\n" + "exec nbdkit -v -D nb...
2023 Mar 23
1
[libnbd PATCH v3 18/19] generator: Add APIs to get/set the socket activation socket name
...36,15 +2036,62 @@ "connect_systemd_socket_activation", { When the NBD handle is closed the server subprocess is killed. + +=head3 Socket name + +The socket activation protocol lets you optionally give +the socket a name. If used, the name is passed to the +NBD server using the C<LISTEN_FDNAMES> environment +variable. To provide a socket name, call +L<nbd_set_socket_activation_name(3)> before calling +the connect function. " ^ blocking_connect_call_description; see_also = [Link "aio_connect_systemd_socket_activation"; Link "connect_comm...
2023 Mar 28
1
libnbd | Failed pipeline for master | 2db30279
Pipeline #819889104 has failed! Project: libnbd ( https://gitlab.com/nbdkit/libnbd ) Branch: master ( https://gitlab.com/nbdkit/libnbd/-/commits/master ) Commit: 2db30279 ( https://gitlab.com/nbdkit/libnbd/-/commit/2db30279bad4f9923baa541008f5da11624d2d1f ) Commit Message: socket activation: set LISTEN_FDNAMES Add LIST... Commit Author: Laszlo Ersek ( https://gitlab.com/lersek ) Pipeline #819889104 ( https://gitlab.com/nbdkit/libnbd/-/pipelines/819889104 ) triggered by Laszlo Ersek ( https://gitlab.com/lersek ) had 1 failed job. Job #4013077739 ( https://gitlab.com/nbdkit/libnbd/-/jobs/4013077739/raw...
2023 Jan 30
2
[PATCH libnbd v2 3/4] generator: Add APIs to get/set the socket activation socket name
...36,15 +2036,62 @@ "connect_systemd_socket_activation", { When the NBD handle is closed the server subprocess is killed. + +=head3 Socket name + +The socket activation protocol lets you optionally give +the socket a name. If used, the name is passed to the +NBD server using the C<LISTEN_FDNAMES> environment +variable. To provide a socket name, call +L<nbd_set_socket_activation_name(3)> before calling +the connect function. " ^ blocking_connect_call_description; see_also = [Link "aio_connect_systemd_socket_activation"; Link "connect_comm...
2023 Mar 25
1
[libnbd PATCH v5 3/4] generator: Add APIs to get/set the socket activation socket name
...36,15 +2036,63 @@ "connect_systemd_socket_activation", { When the NBD handle is closed the server subprocess is killed. + +=head3 Socket name + +The socket activation protocol lets you optionally give +the socket a name. If used, the name is passed to the +NBD server using the C<LISTEN_FDNAMES> environment +variable. To provide a socket name, call +L<nbd_set_socket_activation_name(3)> before calling +the connect function. " ^ blocking_connect_call_description; see_also = [Link "aio_connect_systemd_socket_activation"; Link "connect_comm...
2023 Mar 28
1
[libnbd PATCH v5 3/4] generator: Add APIs to get/set the socket activation socket name
...Call this function before connecting to the > +server. > + > +Some servers such as L<qemu-storage-daemon(1)> > +can use this information to associate the socket with a name > +used on the command line, but most servers will ignore it. > +The name is passed through the C<LISTEN_FDNAMES> environment > +variable. > + > +The parameter C<socket_name> can be a short alphanumeric string. > +If it is set to the empty string (also the default when the handle > +is created) then the name C<unknown> will be seen by the server."; Accurate, > + see_...
2023 Mar 28
1
[libnbd PATCH v5 3/4] generator: Add APIs to get/set the socket activation socket name
...ore connecting to the >> +server. >> + >> +Some servers such as L<qemu-storage-daemon(1)> >> +can use this information to associate the socket with a name >> +used on the command line, but most servers will ignore it. >> +The name is passed through the C<LISTEN_FDNAMES> environment >> +variable. >> + >> +The parameter C<socket_name> can be a short alphanumeric string. >> +If it is set to the empty string (also the default when the handle >> +is created) then the name C<unknown> will be seen by the server."; >...
2023 Jan 31
1
[PATCH libnbd v2 3/4] generator: Add APIs to get/set the socket activation socket name
...ket_activation", { > > When the NBD handle is closed the server subprocess > is killed. > + > +=head3 Socket name > + > +The socket activation protocol lets you optionally give > +the socket a name. If used, the name is passed to the > +NBD server using the C<LISTEN_FDNAMES> environment > +variable. To provide a socket name, call > +L<nbd_set_socket_activation_name(3)> before calling > +the connect function. This creates an implicit client-side stateful API: to pass socket names, you must call two APIs in the correct sequence: nbd_set_socket_activ...
2023 Mar 23
20
[libnbd PATCH v3 00/19] pass LISTEN_FDNAMES with systemd socket activation
...alls for errors in the child process CONNECT_COMMAND.START: centralize resource release CONNECT_COMMAND.START: plug child process leak on error CONNECT_COMMAND.START: replace execvp() call with fork-safe variant socket activation: generalize environment construction socket activation: set LISTEN_FDNAMES Richard W.M. Jones (2): common/include: Copy ascii-ctype functions from nbdkit generator: Add APIs to get/set the socket activation socket name lib/internal.h | 1 + common/include/ascii-ctype.h | 75 +++++ generator/API.ml...