Re: [PATCH spice] reds: don't unlink existing UNIX socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 20, 2018 at 06:58:34PM +0400, Marc-André Lureau wrote:
> Hi
> 
> On Thu, Dec 20, 2018 at 5:44 PM Daniel P. Berrangé <berrange@xxxxxxxxxx> wrote:
> >
> > On Thu, Dec 20, 2018 at 05:37:40PM +0400, marcandre.lureau@xxxxxxxxxx wrote:
> > > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> > >
> > > Since "reds: add Unix socket support" (commit
> > > 5365caeaae537f564d160936e60f71b2dc964ad1), the Spice server will
> > > remove existing socket before binding.
> > >
> > > Although it may seem handy at first, this is a bad idea, as it may
> > > create confusion (or worse).
> >
> > Can you elaborate on what the problem is ?
> 
> If you start 2 server instances with the same address, you are
> overriding the previous instance. I don't think that's a good idea.

Sure, but that's a user configuration mistake. The same thing will
happen with any of the QEMU chardevs that are created, or any other
resources using UNIX sockets.

> > Not deleting the UNIX socket will cause QEMU to fail to startup if
> > the socket already exists on disk.
> 
> Yes, that's the point.

That will hurt all QEMU users who have correct configs, to help a small
number who have mis-configured their QEMU. That's not a net win overall,
it makes a much wider spread problem.

> > This will hit every single time QEMU is started because nothing is
> > deleting the socket on shutdown. Even if something did delete it on
> > shutdown, that's not guaranteed to run on crash.
> >
> > unlinking immediately before bind() is the normal accepted solution
> > to this problem.
> >
> > > Fortunately, passing the Unix path is done mostly by command line,
> > > with qemu addr= Spice argument. Libvirt uses fd-passing socketpair
> > > instead, so the impact should be fairly limited, but we should
> > > probably warn the users in the release notes if we adopt this patch.
> >
> > IMHO this would be a significant step backwards.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]