On Mon, Sep 11, 2023 at 08:18:04AM -0500, Eric Blake wrote:
On Mon, Sep 11, 2023 at 01:11:46PM +0100, Richard W.M. Jones wrote:
> On Mon, Sep 11, 2023 at 07:08:48AM -0500, Eric Blake wrote:
> > On Sat, Sep 09, 2023 at 02:57:48PM +0100, Richard W.M. Jones wrote:
> > > Should have done this a long time ago. I feel it is about time we
> > > change the default of nbdkit --run to imply -U -, rather than opening
> > > a public port.
> > >
> > > Patch series turned out to be a little bit more complicated than I
> > > anticipated, but it contains some nice clean ups.
> >
> > Indeed, just from the summary it sounds like a good idea. nbdkit can
> > take advantage of it immediately, but libnbd will need to continue to
> > explicitly use -U - for a while longer (as long as older nbdkit tends
> > to be the version still installed on various CI platforms).
>
> Although it might not be useful for libnbd, we could also had a
> --dump-config sentinel, something like:
>
> $ nbdkit --dump-config
> ...
> run_default_socket=Unix
>
> (and add run_default_socket=TCP to older branches). If you can think
> of a better name for this ... :-)
That actually sounds good as-is. I don't know if backporting a patch
to expose run_default_socket=TCP makes a difference (after all, the
absence of run_default_socket= in the config output serves the same
purpose), but I'll leave that up to your call.
Something like the attached patch. It leaves it open whether
we add the sentinel to older versions or not.
Rich.
--
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.
http://libguestfs.org/virt-v2v