search for: socket_activ

Displaying 20 results from an estimated 30 matches for "socket_activ".

2017 Jan 31
0
[PATCH nbdkit] Add support for socket activation.
...al pages of interest: + +L<systemd.socket(5)>. + =head1 AUTHORS Richard W.M. Jones diff --git a/src/main.c b/src/main.c index 9453cce..e935da2 100644 --- a/src/main.c +++ b/src/main.c @@ -54,6 +54,8 @@ #include "nbdkit-plugin.h" #include "internal.h" +#define FIRST_SOCKET_ACTIVATION_FD 3 /* defined by systemd ABI */ + static char *make_random_fifo (void); static void open_plugin_so (const char *filename); static void start_serving (void); @@ -64,6 +66,7 @@ static void write_pidfile (void); static void fork_into_background (void); static uid_t parseuser (const char *)...
2018 Jun 28
1
[nbdkit PATCH] main: More idiomatic use of getopt_long
...+ { struct filter_filename *t; t = malloc (sizeof *t); @@ -263,51 +276,47 @@ main (int argc, char *argv[]) t->filename = optarg; filter_filenames = t; } - else if (strcmp (long_options[option_index].name, "run") == 0) { - if (socket_activation) { - fprintf (stderr, "%s: cannot use socket activation with --run flag\n", - program_name); - exit (EXIT_FAILURE); - } - run = optarg; - foreground = 1; - } - else if (strcmp (long_options[option_index].name, "s...
2020 Mar 23
0
[PATCH nbdkit 2/3] server: Inject API functions for Windows
...due to potential ABI incompatibilities. --- server/main.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/server/main.c b/server/main.c index b303146c..373918cf 100644 --- a/server/main.c +++ b/server/main.c @@ -104,6 +104,7 @@ unsigned int socket_activation /* $LISTEN_FDS and $LISTEN_PID set */; /* The linked list of zero or more filters, and one plugin. */ struct backend *top; +struct nbdkit_functions *functions = NULL; static char *random_fifo_dir = NULL; static char *random_fifo = NULL; @@ -152,6 +153,49 @@ dump_config (void) print...
2020 Apr 14
0
[nbdkit PATCH v2 2/3] server: Sanitize stdin/out before running plugin code
...ugin.unload diff --git a/server/main.c b/server/main.c index 054e60b9..bbb416c3 100644 --- a/server/main.c +++ b/server/main.c @@ -101,6 +101,8 @@ const char *user, *group; /* -u & -g */ bool verbose; /* -v */ bool vsock; /* --vsock */ unsigned int socket_activation /* $LISTEN_FDS and $LISTEN_PID set */; +int orig_in = -1; /* dup'd stdin during -s/--run */ +int orig_out = -1; /* dup'd stdout during -s/--run */ /* The linked list of zero or more filters, and one plugin. */ struct backend *top; @@ -694,6 +696,40 @@ mai...
2020 Apr 04
0
[nbdkit PATCH 2/2] server: Sanitize stdin/out before running plugin code
...ugin.unload diff --git a/server/main.c b/server/main.c index 748122fc..596dd306 100644 --- a/server/main.c +++ b/server/main.c @@ -101,6 +101,8 @@ const char *user, *group; /* -u & -g */ bool verbose; /* -v */ bool vsock; /* --vsock */ unsigned int socket_activation /* $LISTEN_FDS and $LISTEN_PID set */; +int orig_in = -1; /* dup'd stdin during -s/--run */ +int orig_out = -1; /* dup'd stdout during -s/--run */ /* The linked list of zero or more filters, and one plugin. */ struct backend *top; @@ -694,6 +696,35 @@ mai...
2017 Nov 17
0
[nbdkit PATCH 6/6] Add --threads option for supporting true parallel requests
...if (errno || *end) { + fprintf (stderr, "%s: cannot parse '%s' into threads\n", + program_name, optarg); + exit (EXIT_FAILURE); + } + /* XXX Worth a maximimum limit on threads? */ + } + case 'U': if (socket_activation) { fprintf (stderr, "%s: cannot use socket activation with -U flag\n", diff --git a/src/plugins.c b/src/plugins.c index e8c6b28..47c4fa5 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -360,6 +360,14 @@ plugin_unlock_request (struct connection *conn) } } +bool +plugin...
2020 Oct 01
2
[PATCH libnbd] interop: Add test of qemu-storage-daemon.
This commit adds a simple test of qemu-storage-daemon (QSD). On the basis that QSD is just qemu-nbd in new clothes this is only a simple test, not complete coverage. Nor does it test the unique features of QSD like being able to use QMP to create new server instances. Unfortunately QSD is not yet stable upstream. This version works with qemu 5.1.0 but at least two of the command line
2019 Oct 01
3
[PATCH libnbd 0/2] Change qemu-nbd interop tests to use socket activation.
Now that we have implemented systemd socket activation, we can use this to run qemu-nbd in tests. The first patch leaves some dead code around (the -DSERVE_OVER_TCP=1 path). It's possible we might want to use this to test against a putative future NBD server that only supports TCP, but on the other hand maybe we should just remove it. Tests & valgrind still pass for me. Rich.
2019 Oct 18
0
[PATCH nbdkit] Add support for AF_VSOCK.
...#include <pthread.h> @@ -85,6 +90,7 @@ bool tls_verify_peer; /* --tls-verify-peer */ char *unixsocket; /* -U */ const char *user, *group; /* -u & -g */ bool verbose; /* -v */ +bool vsock; /* --vsock */ unsigned int socket_activation /* $LISTEN_FDS and $LISTEN_PID set */; /* The currently loaded plugin. */ @@ -329,6 +335,16 @@ main (int argc, char *argv[]) tls_verify_peer = true; break; + case VSOCK_OPTION: +#ifdef AF_VSOCK + vsock = true; + break; +#else + fprintf (stderr, "%s: A...
2019 Oct 18
1
[PATCH nbdkit v2] Add support for AF_VSOCK.
v1 was discussed here: https://www.redhat.com/archives/libguestfs/2019-October/thread.html#00100 v2: - Bind to VMADDR_CID_ANY (instead of HOST) and update the documentation accordingly. - Don't bother with SOCK_CLOEXEC fallback path that can never be used. Rich.
2020 Apr 04
6
[nbdkit PATCH 0/2] stdin/out cleanups
This is what I've been playing with in response to my earlier question about what to do with 'nbdkit -s sh -' (https://www.redhat.com/archives/libguestfs/2020-April/msg00032.html) I'm still open to ideas on a better name, and/or whether adding <stdbool.h> to our public include files is a good idea (if not, returning int instead of bool is tolerable). Eric Blake (2):
2019 Jan 01
2
[PATCH nbdkit] server: Use bool for types which are really booleans.
...in.c index e8a15f7..5e538bf 100644 --- a/server/main.c +++ b/server/main.c @@ -35,6 +35,7 @@ #include <stdio.h> #include <stdlib.h> +#include <stdbool.h> #include <string.h> #include <fcntl.h> #include <unistd.h> @@ -75,26 +76,26 @@ static unsigned int get_socket_activation (void); static int is_config_key (const char *key, size_t len); struct debug_flag *debug_flags; /* -D */ -int exit_with_parent; /* --exit-with-parent */ +bool exit_with_parent; /* --exit-with-parent */ const char *exportname; /* -e */ -int foreground;...
2019 Oct 18
2
[PATCH nbdkit] Add support for AF_VSOCK.
This is a series of patches to libnbd and nbdkit adding AF_VSOCK support. On the host side it allows you to start an nbdkit instance which listens on a virtio-vsock socket: $ ./nbdkit -fv --vsock memory 1G ... nbdkit: debug: bound to vsock 2:10809 On the guest side you can then use libnbd to connect to the server: $ ./run nbdsh -c 'h.connect_vsock(2, 10809)' -c
2017 Feb 03
5
[PATCH 0/5] Support socket activation in virt-p2v.
As the subject says, support socket activation in virt-p2v. I have added upstream support for socket activation to nbdkit already: https://github.com/libguestfs/nbdkit/commit/7ff39d028c6359f5c0925ed2cf4a2c4c751af2e4 I posted a patch for qemu-nbd, still waiting on more reviews for that one: https://www.mail-archive.com/qemu-devel@nongnu.org/msg427246.html I tested this against old and new qemu
2017 Nov 20
10
[nbdkit PATCH v2 0/8] Support parallel transactions within single connection
I've posted some of these patches or ideas before; but now I'm confident enough with the series that it should be ready to push; at any rate, I can now run test-socket-activation in a tight loop without triggering any crashes or hangs. With this in place, I'm going back to work on making the nbd forwarder wort with the parallel thread model. Eric Blake (8): sockets: Use
2020 Mar 23
6
[PATCH nbdkit 0/3] msys2 support for review
I pushed a few of the msys2 patches upstream. I changed the way that $(SHARED_LDFLAGS) works so it's more to my liking, and the others were pushed unchanged. Three patches remain which I'm posting on the mailing list for proper review. Rich.
2019 Oct 04
4
[PATCH libnbd 1/4] generator: Allow long ‘name - shortdesc’ in man pages.
For commands with long names and/or short descriptors, you can end up going over 72 characters in the first line of the man page (causing podwrapper to complain). Wrap these lines. --- generator/generator | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generator/generator b/generator/generator index 7d3f656..ad1cb6b 100755 --- a/generator/generator +++ b/generator/generator
2018 Jan 17
0
[PATCH 7/9] Implement filters.
...NULL) { + perror ("malloc"); + exit (EXIT_FAILURE); + } + t->next = filter_filenames; + t->filename = optarg; + filter_filenames = t; + } else if (strcmp (long_options[option_index].name, "run") == 0) { if (socket_activation) { fprintf (stderr, "%s: cannot use socket activation with --run flag\n", @@ -497,23 +516,46 @@ main (int argc, char *argv[]) } } - backend = open_plugin_so (filename, short_name); + /* Open the plugin (first) and then wrap the plugin with the + * filters. T...
2020 Apr 14
6
[nbdkit PATCH v2 0/3] more consistent stdin/out handling
In v2: - use int instead of bool in the public header - split the tests from the code - don't overload test-layers; instead, add new tests - add a missing fflush exposed by the new tests - other minor cleanups Eric Blake (3): server: Add nbdkit_stdio_safe server: Sanitize stdin/out before running plugin code server: More tests of stdin/out handling docs/nbdkit-plugin.pod |
2017 Nov 17
8
[RFC nbdkit PATCH 0/6] Enable full parallel request handling
I want to make my nbd forwarding plugin fully parallel - but to do that, I first need to make nbdkit itself fully parallel ;) With this series, I was finally able to demonstrate out-of-order responses when using qemu-io (which is great at sending back-to-back requests prior to waiting for responses) coupled with the nbd file plugin (which has a great feature of rdelay and wdelay, to make it