Displaying 9 results from an estimated 9 matches for "nbd_connect_socket_activation".
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
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 01
0
Re: [PATCH libnbd v2 2/2] api: Implement local command with systemd socket activation.
...rts_socket_activation() call that (in
future) always returns true.
> >+ if (h->argv)
> >+ nbd_internal_free_string_list (h->argv);
>
> How can h->argv ever be previously set?
Probably not right now, but it might happen if we ever implement error
recovery for either nbd_connect_socket_activation or
nbd_connect_command. At the moment these functions move the handle to
the DEAD state if they fail, but that's not really necessary in all
cases.
> >--- a/lib/handle.c
> >+++ b/lib/handle.c
> >@@ -129,6 +129,16 @@ nbd_close (struct nbd_handle *h)
> > free_cmd_list...
2019 Sep 26
0
[PATCH libnbd 2/2] api: Implement local command with systemd socket activation.
..."argv" ]; ret = RErr;
+ permitted_states = [ Created ];
+ shortdesc = "connect using systemd socket activation";
+ longdesc = "\
+Run the command as a subprocess and begin connecting to it using
+systemd socket activation. Parameters behave as documented in
+L<nbd_connect_socket_activation(3)>.
+
You can check if the connection is still connecting by calling
L<nbd_aio_is_connecting(3)>, or if it has connected to the server
and completed the NBD handshake by calling L<nbd_aio_is_ready(3)>,
@@ -2678,6 +2719,8 @@ let first_version = [
"get_protocol", (1, 2...
2019 Sep 30
0
[PATCH libnbd v2 2/2] api: Implement local command with systemd socket activation.
..."argv" ]; ret = RErr;
+ permitted_states = [ Created ];
+ shortdesc = "connect using systemd socket activation";
+ longdesc = "\
+Run the command as a subprocess and begin connecting to it using
+systemd socket activation. Parameters behave as documented in
+L<nbd_connect_socket_activation(3)>.
+
You can check if the connection is still connecting by calling
L<nbd_aio_is_connecting(3)>, or if it has connected to the server
and completed the NBD handshake by calling L<nbd_aio_is_ready(3)>,
@@ -2678,6 +2719,8 @@ let first_version = [
"get_protocol", (1, 2...
2019 Sep 26
5
[PATCH libnbd 1/2] lib: Avoid killing subprocess twice.
If the user calls nbd_kill_subprocess, we shouldn't kill the process
again when we close the handle (since the process has likely gone and
we might be killing a different process).
---
lib/handle.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/handle.c b/lib/handle.c
index 2af25fe..5ad818e 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -315,6 +315,8 @@
2019 Sep 30
4
[PATCH libnbd v2 0/2] Implement systemd socket activation.
v1 was posted here:
https://www.redhat.com/archives/libguestfs/2019-September/thread.html#00337
v2:
- Drop the first patch.
- Hopefully fix the multiple issues with fork-safety and general
behaviour on error paths.
Note this requires execvpe for which there seems to be no equivalent
on FreeBSD, except some kind of tedious path parsing (but can we
assign to environ?)
Rich.
2019 Oct 01
2
Re: [PATCH libnbd v2 2/2] api: Implement local command with systemd socket activation.
On 9/30/19 11:32 AM, Richard W.M. Jones wrote:
> This adds new APIs for running a local NBD server and connecting to it
> using systemd socket activation (instead of stdin/stdout).
>
> This includes interop tests against nbdkit and qemu-nbd which I
> believe are the only NBD servers supporting socket activation. (If we
> find others then we can add more interop tests in
2019 Sep 26
2
Re: [PATCH libnbd 2/2] api: Implement local command with systemd socket activation.
...ut;
> + }
Is it worth populating anything in the temp file...
> +
> + nbd = nbd_create ();
> + if (nbd == NULL) {
> + fprintf (stderr, "%s\n", nbd_get_error ());
> + goto out;
> + }
> +
> + char *args[] = { SERVER, SERVER_PARAMS, NULL };
> + if (nbd_connect_socket_activation (nbd, args) == -1) {
> + fprintf (stderr, "%s\n", nbd_get_error ());
> + goto out;
> + }
> +
> + actual_size = nbd_get_size (nbd);
> + if (actual_size == -1) {
> + fprintf (stderr, "%s\n", nbd_get_error ());
> + goto out;
> + }
> +...