search for: vddk_config_complete

Displaying 20 results from an estimated 20 matches for "vddk_config_complete".

2020 Feb 13
2
[nbdkit PATCH] vddk: Make 'file=' a magic key
...ost cases. +See L<nbdkit(1)/Magic parameters>. + =item B<libdir=>PATHNAME This sets the path of the VMware VDDK distribution. diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c index 6deb0a0b..344b4e6b 100644 --- a/plugins/vddk/vddk.c +++ b/plugins/vddk/vddk.c @@ -416,7 +416,7 @@ vddk_config_complete (void) } #define vddk_config_help \ - "file=<FILENAME> (required) The filename (eg. VMDK file) to serve.\n" \ + "[file=]<FILENAME> (required) The filename (eg. VMDK file) to serve.\n" \ "Many optional parameters are supported, see nbdkit-vddk-plugi...
2020 Feb 13
4
[PATCH nbdkit v2 2/3] NOT WORKING: vddk: Drive library loading from libdir parameter.
I couldn't get this to work in the end. This is the latest non-working version. This email documents what doesn't work for the permanent record. The central problem is that VDDK InitEx() appears to dlopen() various of its own plugins. Although I wasn't able to capture exactly what dlopen() command it is running, the plugins cannot be loaded because they rely on the recompiled
2020 Feb 17
0
Re: [nbdkit PATCH] vddk: Make 'file=' a magic key
...rs>. > + > =item B<libdir=>PATHNAME > > This sets the path of the VMware VDDK distribution. > diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c > index 6deb0a0b..344b4e6b 100644 > --- a/plugins/vddk/vddk.c > +++ b/plugins/vddk/vddk.c > @@ -416,7 +416,7 @@ vddk_config_complete (void) > } > > #define vddk_config_help \ > - "file=<FILENAME> (required) The filename (eg. VMDK file) to serve.\n" \ > + "[file=]<FILENAME> (required) The filename (eg. VMDK file) to serve.\n" \ > "Many optional parameters are su...
2020 Feb 17
1
Re: [nbdkit PATCH] vddk: Make 'file=' a magic key
...dir=>PATHNAME > > > > This sets the path of the VMware VDDK distribution. > > diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c > > index 6deb0a0b..344b4e6b 100644 > > --- a/plugins/vddk/vddk.c > > +++ b/plugins/vddk/vddk.c > > @@ -416,7 +416,7 @@ vddk_config_complete (void) > > } > > > > #define vddk_config_help \ > > - "file=<FILENAME> (required) The filename (eg. VMDK file) to serve.\n" \ > > + "[file=]<FILENAME> (required) The filename (eg. VMDK file) to serve.\n" \ > > "M...
2020 Feb 18
4
[nbdkit PATCH v7 0/2] vddk: Drive library loading from libdir parameter.
In v7: everything should work now! The re-exec code is slightly simplified, with Rich's suggestion to pass the original LD_LIBRARY_PATH rather than just the prefix being added, and I've now finished wiring up the initial dlopen() check into code that correctly computes the right prefix dir to add to LD_LIBRARY_PATH. Eric Blake (1): vddk: Add re-exec with altered environment Richard
2020 Feb 13
2
[PATCH nbdkit 1/2] vddk: Delay loading VDDK until config_complete.
...\ + exit (EXIT_FAILURE); \ + } \ + } while (0) +#define OPTIONAL_STUB(fn,ret,args) fn = dlsym (dl, #fn) +#include "vddk-stubs.h" +#undef STUB +#undef OPTIONAL_STUB +} + static int vddk_config_complete (void) { @@ -330,6 +331,8 @@ vddk_config_complete (void) #undef missing } + load_library (); + /* Initialize VDDK library. */ DEBUG_CALL ("VixDiskLib_InitEx", "%d, %d, &debug_fn, &error_fn, &error_fn, %s, %s", @@ -831,7 +834,6 @@ static s...
2020 Feb 18
0
[nbdkit PATCH v7 2/2] vddk: Drive library loading from libdir parameter.
...\n\n" + "set libdir=/path/to/vmware-vix-disklib-distrib.\n\n" "See the nbdkit-vddk-plugin(1) man page for details.", orig_error ? : "(unknown error)", sonames[0]); exit (EXIT_FAILURE); @@ -406,7 +446,7 @@ vddk_config_complete (void) char *env = getenv ("LD_LIBRARY_PATH"); nbdkit_debug ("cleaning up after re-exec"); - if (!env || strstr (env, reexeced) != 0 || + if (!env || strstr (env, reexeced) == NULL || (libdir && strncmp (env, libdir, strlen (libdir)) != 0)) {...
2020 Jun 22
0
[PATCH nbdkit 2/2] vddk: Defer library initialization to .after_fork().
...y in certain configurations. --- plugins/vddk/vddk.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c index e6639b4d..a481e8bf 100644 --- a/plugins/vddk/vddk.c +++ b/plugins/vddk/vddk.c @@ -431,12 +431,31 @@ vddk_config_complete (void) return 0; } +#define vddk_config_help \ + "[file=]<FILENAME> (required) The filename (eg. VMDK file) to serve.\n" \ + "Many optional parameters are supported, see nbdkit-vddk-plugin(3)." + static int vddk_get_ready (void) { - VixError err; - load_li...
2020 Feb 17
5
[nbdkit PATCH v5 0/4] vddk: Drive library loading from libdir parameter.
Differences from v4: Patch 1 is simplified: I realized that since we already use -rdynamic for nbdkit (after all, we WANT our dlopen()d plugins to be able to call our nbdkit_* exports), it is only a matter of adding dlopen to the set of symbols that we export. With that done, there is no separate shared library needed; our dlopen shim is now part of nbdkit proper, and we don't have to tweak
2020 Feb 16
6
[nbdkit PATCH v4 0/4] vddk: Drive library loading from libdir parameter.
I'm a lot happier with this version: no mucking with dlmopen(). It does add a bit more coupling between nbdkit proper and the vddk plugin (namely, nbdkit now exports a new function that the vddk plugin relies on), but patch 2 adds testsuite coverage of the new function so we shouldn't regress. Patch 1 and 2 are new, patch 3 is unchanged from when Rich posted it in v2, and patch 4 is
2020 Feb 18
2
[nbdkit PATCH v6] vddk: Add re-exec with altered environment
...+ perform_reexec (libdir); /* TODO: Use correct dir */ nbdkit_error ("%s\n\n" "If '%s' is located on a non-standard path you may need to\n" "set $LD_LIBRARY_PATH or edit /etc/ld.so.conf.\n\n" @@ -301,6 +392,47 @@ vddk_config_complete (void) return -1; } + /* If load_library caused a re-execution with an expanded + * LD_LIBRARY_PATH, restore it back to its original contents. + * dlopen uses the value of LD_LIBRARY_PATH cached at program + * startup; our change is for the sake of child processes (such as + * --r...
2020 Feb 25
6
[PATCH nbdkit 0/5] server: Add .get_ready callback.
I like this change. I think we were overloading the config_complete method before to do two different things (complete configuration; do any allocation/housekeeping necessary before we can start serving). The only questions in my mind are whether we want this before 1.18, and whether the name ("get_ready") is a good one. Rich.
2020 May 07
1
[PATCH nbdkit] vddk: Suppress errors in can_extents test (RHBZ#1709211).
...ct nbdkit_plugin plugin = { .name = "vddk", .longname = "VMware VDDK plugin", .version = PACKAGE_VERSION, + .load = vddk_load, .unload = vddk_unload, .config = vddk_config, .config_complete = vddk_config_complete, -- 2.25.0
2019 Oct 11
3
[PATCH NOT WORKING nbdkit v2 0/2] vddk: Restructure plugin to allow greater parallelism.
This is my second attempt at this. The first version (also not working) was here: https://www.redhat.com/archives/libguestfs/2019-October/msg00062.html In part 1/2 I introduce a new .ready_to_serve plugin method which is called after forking and just before accepting any client connection. The idea would be that plugins could start background threads here. However this doesn't work well in
2020 Feb 17
0
[nbdkit PATCH v5 4/4] vddk: Drive library loading from libdir parameter.
...n\n" + "set libdir=/path/to/vmware-vix-disklib-distrib.\n\n" "See the nbdkit-vddk-plugin(1) man page for details.", orig_error ? : "(unknown error)", sonames[0]); exit (EXIT_FAILURE); @@ -331,6 +357,14 @@ vddk_config_complete (void) #undef missing } + if (!libdir) { + libdir = strdup (VDDK_LIBDIR); + if (!libdir) { + nbdkit_error ("strdup: %m"); + return -1; + } + } + load_library (); /* Initialize VDDK library. */ diff --git a/tests/test-vddk-real.sh b/tests/test-vddk-real.sh...
2020 Jun 02
0
[PATCH nbdkit 2/5] vddk: Move reexec code to a new file.
..._fatal) * includes its directory for all future loads. This may modify * path in-place and/or re-exec nbdkit, but that's okay. */ - check_reexec (dirname (path)); + reexec_if_needed (dirname (path)); break; } if (i == 0) { @@ -498,33 +383,9 @@ vddk_config_complete (void) return -1; } - /* If load_library caused a re-execution with an expanded - * LD_LIBRARY_PATH, restore it back to its original contents, passed - * as the value of "reexeced_". dlopen uses the value of - * LD_LIBRARY_PATH cached at program startup; our change is fo...
2019 Oct 10
1
[PATCH NOT WORKING nbdkit] vddk: Restructure plugin to allow greater parallelism.
We had a query yesterday about the VDDK plugin and making it actually obey the weird "Multithreading Considerations" rules in the VDDK documentation (https://vdc-download.vmware.com/vmwb-repository/dcr-public/8f96698a-0e7b-4d67-bb6c-d18a1d101540/ef536a47-27cd-481a-90ef-76b38e75353c/vsphere-vddk-671-programming-guide.pdf) This patch is my attempt to implement this. The idea is that the
2020 Feb 13
1
[nbdkit PATCH v3] vddk: Drive library loading from libdir parameter.
...n\n" + "set libdir=/path/to/vmware-vix-disklib-distrib.\n\n" "See the nbdkit-vddk-plugin(1) man page for details.", orig_error ? : "(unknown error)", sonames[0]); exit (EXIT_FAILURE); @@ -331,6 +386,14 @@ vddk_config_complete (void) #undef missing } + if (!libdir) { + libdir = strdup (VDDK_LIBDIR); + if (!libdir) { + nbdkit_error ("strdup: %m"); + return -1; + } + } + load_library (); /* Initialize VDDK library. */ diff --git a/tests/Makefile.am b/tests/Makefile.am index e12842...
2020 Jun 22
4
[PATCH nbdkit 1/2] server: Add .after_fork callback, mainly for plugins to create threads.
If you have a plugin which either creates background threads itself or uses a library that creates background threads, it turns out you cannot create these in .get_ready (or earlier). The reason is that nbdkit forks when either daemonizing itself or using the --run option, and fork cancels all the background threads in the child process (the daemonized or captive nbdkit). The only good solution
2020 Jun 02
9
[PATCH nbdkit 0/5] vddk: Fix password parameter.
Probably needs a bit of cleanup, but seems like it is generally the right direction. One thing I've noticed is that the expect test randomly (but rarely) hangs :-( I guess something is racey but I don't know what at the moment. Rich.