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

Re: [libvirt] [PATCH] virNetServer: Don't fail if we can't initialize avahi



On Mon, Jan 16, 2012 at 07:52:38PM +0000, Daniel P. Berrange wrote:
> On Mon, Jan 16, 2012 at 11:29:51AM -0700, Eric Blake wrote:
> > On 01/14/2012 01:01 PM, Guido Günther wrote:
> > > since libvird won't start otherwise without avahi running.
> > > 
> > > Having avahi compiled in shouldn't force us to have avahi running.
> > > ---
> > >  src/rpc/virnetserver.c |    5 ++---
> > >  1 files changed, 2 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
> > > index f761e6b..ab6d112 100644
> > > --- a/src/rpc/virnetserver.c
> > > +++ b/src/rpc/virnetserver.c
> > > @@ -695,9 +695,8 @@ void virNetServerRun(virNetServerPtr srv)
> > >      virNetServerLock(srv);
> > >  
> > >  #if HAVE_AVAHI
> > > -    if (srv->mdns &&
> > > -        virNetServerMDNSStart(srv->mdns) < 0)
> > > -        goto cleanup;
> > > +    if (srv->mdns)
> > > +        virNetServerMDNSStart(srv->mdns);
> > 
> > virNetServerMDNSStart raises virNetError, but does not directly log
> > anything (so if the user clears out the last error, we may have lost the
> > information).  Should this patch also ensure that a log message is
> > emitted when avahi initialization is attempted but failed, now that we
> > are not treating it as a fatal error?
> 
> I don't think this is the right fix. The MDNS client is
> supposed to already deal with the case where Avahi is not
> running. It should be registering a DBus watch, which will
> result in a notification when Avahi later starts up. At
> which point we should register. Something in this process
> is not working, and so just ignoring the error is not
> right IMHO
Hmm...I can't seem to reproduce this with current git on my laptop. I
needed this fix on a server with 0.9.8 - I'll recheck on that box once I
can run 0.9.9 there.
Cheers,
 -- Guido


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