search for: unixsocket

Displaying 20 results from an estimated 154 matches for "unixsocket".

Did you mean: unix_socket
2019 May 28
1
[libnbd PATCH] connect: Better handling of long socket names
...URI document mentions that URIs can start with a leading (encoded) NUL byte to access the Linux abstract socket namespace, our use of strlen(sun.sun_path) would truncate the trailing bytes - but to support abstract sockets in general, we'd need to add h->unixlen alongside the existing h->unixsocket. --- generator/states-connect.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/generator/states-connect.c b/generator/states-connect.c index a410e34..014f6bb 100644 --- a/generator/states-connect.c +++ b/generator/states-connect.c @@ -86,15 +86,20 @@ } C...
2019 Sep 12
1
[libnbd PATCH] nbdsh: Support -u as synonym for --connect
...nd") diff --git a/sh/test-context.sh b/sh/test-context.sh index 3b32ba9..f2c3ba5 100755 --- a/sh/test-context.sh +++ b/sh/test-context.sh @@ -21,7 +21,7 @@ fail=0 # Without -b, no meta context is requested output=$(nbdkit -U - null --run 'nbdsh \ - --connect "nbd+unix://?socket=$unixsocket" \ + -u "nbd+unix://?socket=$unixsocket" \ -c "print (h.can_meta_context (nbd.CONTEXT_BASE_ALLOCATION))"') if test "x$output" != xFalse; then echo "$0: unexpected output: $output" @@ -30,7 +30,7 @@ fi # With -b (and a server that supp...
2020 Jul 10
0
[RFC nbdkit PATCH] server: Allow --run with --vsock
...nce qemu and guestfish URLs have a different format, so nbdkit tries to guess which you are running. If diff --git a/server/internal.h b/server/internal.h index 68c53366..1dd84ccb 100644 --- a/server/internal.h +++ b/server/internal.h @@ -129,6 +129,7 @@ extern bool tls_verify_peer; extern char *unixsocket; extern const char *user, *group; extern bool verbose; +extern bool vsock; extern int saved_stdin; extern int saved_stdout; diff --git a/server/captive.c b/server/captive.c index f8107604..a5b227c4 100644 --- a/server/captive.c +++ b/server/captive.c @@ -72,7 +72,7 @@ run_command (void) /*...
2019 Sep 28
0
[nbdkit PATCH v2 5/7] server: Allow longer NBD_OPT
...d6e 100755 --- a/tests/test-long-name.sh +++ b/tests/test-long-name.sh @@ -84,10 +84,10 @@ nbdkit -U - --mask-handshake=0 null --run 'qemu-io -r -f raw -c quit \ # Repeat with NBD_OPT_GO. nbdkit -U - null --run 'qemu-io -r -f raw -c quit \ - nbd+unix:///'$name1k$name1k'\?socket=$unixsocket' || fail=1 -# FIXME: Right now, we can't accept full 4k length - this should succeed + nbd+unix:///'$name4k'\?socket=$unixsocket' || fail=1 +# See above comment about whether this is testing nbdkit or qemu: nbdkit -U - null --run 'qemu-io -r -f raw -c quit \ - nbd+unix://...
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
2006 Mar 08
4
Performance with many look-up tables
Hi, I have an app - a first cut ROR - so it''s a bit of a mess. I''m now trying to clean it up. The app relies on a heap of look-up tables that are, by and large, static. I''m wondering where and how to initialise these collections once - so that I don''t have to keep hitting the database every time I start a new action. Can I initialise the collections at the
2019 Jun 26
3
[nbdkit PATCH] captive: Support $uri in --run
...@ run_command (void) exit (EXIT_FAILURE); } - /* Construct $nbd "URL". Unfortunately guestfish and qemu take + /* Construct $uri. */ + fprintf (fp, "uri="); + if (port) { + fprintf (fp, "nbd://localhost:"); + shell_quote (port, fp); + } + else if (unixsocket) { + fprintf (fp, "nbd+unix://\\?socket="); + shell_quote (unixsocket, fp); + } + fprintf (fp, "\n"); + + /* Construct older $nbd "URL". Unfortunately guestfish and qemu take * different syntax, so try to guess which one we need. */ fprintf (fp, &q...
2019 Sep 12
1
[libnbd PATCH v2] nbdsh: Prefer --uri over --connect
...--git a/sh/test-context.sh b/sh/test-context.sh index 9a7d3ab..ab3ae80 100755 --- a/sh/test-context.sh +++ b/sh/test-context.sh @@ -21,7 +21,7 @@ fail=0 # Without --base-allocation, no meta context is requested output=$(nbdkit -U - null --run 'nbdsh \ - --connect "nbd+unix://?socket=$unixsocket" \ + -u "nbd+unix://?socket=$unixsocket" \ -c "print (h.can_meta_context (nbd.CONTEXT_BASE_ALLOCATION))"') if test "x$output" != xFalse; then echo "$0: unexpected output: $output" @@ -30,26 +30,26 @@ fi # With --base-allocation (and a...
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
2008 Apr 14
6
Good news: BackgrounDRb now works on Windows
...9;t tried yet but it''s great that this many cases work. I definitely have to try to figure out why the return value of a synchronous call is the whole hash, and I might need help on that because I''m mystified. The primary obstacles to making BackgrounDRb work on Windows were: 1. UNIXSocket - it wasn''t too hard to add code that uses TCPSocket unless defined? UNIXSocket. And there were four lines of code that checked if a socket was a UNIXSocket to decide whether it''s an "internal" read or write, but those lines were crashing because UNIXSocket isn''...
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.
...<syslog.h> #include <sys/types.h> #include <sys/stat.h> +#include <sys/socket.h> + +#ifdef HAVE_LINUX_VM_SOCKETS_H +#include <linux/vm_sockets.h> +#endif #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...
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.
2006 Sep 01
11
mongrel thread safety and global variables
In environment.rb file, I initialize a connection to some data vending servers, through TCP sockets. The connection object is global and hence the code: #environment.rb $generic_connection = ConnectionClass.instance (singleton class) $generic_connection.connect_me( this call will make the connection) The above approach is to make sure that, only one connection is made to the data vending
2019 Oct 18
2
Re: [PATCH nbdkit] Add support for AF_VSOCK.
...r. > + /* If the user has mixed up -p/--run/-s/-U/--vsock options, then > + * give an error. > * > * XXX Actually the server could easily be extended to handle both > * TCP/IP and Unix sockets, or even multiple TCP/IP ports. > */ > - if ((port && unixsocket) || (port && listen_stdin) || > - (unixsocket && listen_stdin) || (listen_stdin && run)) { > + if ((port && unixsocket) || > + (port && listen_stdin) || > + (unixsocket && listen_stdin) || > + (listen_stdin &&am...
2019 Sep 28
11
[nbdkit PATCH v2 0/7] Spec compliance patches
Since the v1 series (0/4, at [1]), I've applied patches 1 and 2, rewritten patch 3 [Forbid NUL in export and context names] into patch 4 here, patch 4 there turned into patch 6 here, and everything else here is new. [1]https://www.redhat.com/archives/libguestfs/2019-September/msg00180.html I don't know if there is a handy reusable function for checking whether a string contains valid
2022 Nov 04
3
[libnbd PATCH v2 0/3] Improve nbdsh -u handling
v1 was here: https://listman.redhat.com/archives/libguestfs/2022-October/030216.html Since then, I've incorporated changes based on Rich's feedback: swap order of patches 2 and 3 less change in patch 1 (including no unsafe eval(%s) for --uri) in patch 2, include -c in list of snippets to store, and use dict of lambdas to map back to the desired action Eric Blake (3): nbdsh:
2019 Sep 12
2
[libnbd PATCH] nbdsh: Add -b option to simplify h.block_status
...this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +# Test effects of nbdsh -b +fail=0 + +# Without -b, no meta context is requested +output=$(nbdkit -U - null --run 'nbdsh \ + --connect "nbd+unix://?socket=$unixsocket" \ + -c "print (h.can_meta_context (nbd.CONTEXT_BASE_ALLOCATION))" </dev/null') +if test "x$output" != xFalse; then + echo "$0: unexpected output: $output" + fail=1 +fi + +# With -b (and a server that supports it), meta context works. +output=$(nbd...
2007 Dec 14
4
Error when loading backgroundrb
...g error (when doing script/backgroundrb start) on my local machine, which is running os x 10.4.11. However, it works just fine on my linux server. RAILS_ROOT/vendor/plugins/backgroundrb/lib/../framework/nbio.rb:64:in `dump_object'': undefined method `write_nonblock'' for #<UNIXSocket: 0x135b5f4> (NoMethodError) I just grabbed the latest (r274) from the repository, and my Packet gems are identical. I also deleted the backgroundrb script and re- ran rake backgroundrb:setup. Any thoughts? Thanks, Todd
2019 Oct 19
1
Re: [nbdkit PATCH 2/2] tests: Enhance captive test
...gt; +fail=0 > + > sock=`mktemp -u` > -files="$sock captive.out" > +files="$sock captive.out captive.pid" > rm -f $files > cleanup_fn rm -f $files > > nbdkit -U $sock example1 --run ' > - sleep 5; echo nbd=$nbd; echo port=$port; echo socket=$unixsocket > + sleep 1; echo nbd=$nbd; echo port=$port; echo socket=$unixsocket > ' > captive.out For some reason this test is now failing much more frequently under load. I can pretty easily reproduce the failure on my local 24 core machine, especially if I use ‘make check-valgrind’, and...