Re: [libvirt] Why is avahi-daemon being started?

[adding libvir-list] On 09/07/2010 07:42 AM, Tom Horsley wrote:
On Tue, 07 Sep 2010 13:51:09 +0100 Adam Williamson wrote:
I did find a "Should-start: avahi-daemon" comment in the libvirtd init script, so maybe that is the source.
Shouldn't be. 'Should-start' means 'if this other service is enabled, it should be started before this one': it's not a strict dependency, 'this other service MUST be started before this one'.
Yea, changing the comment there didn't fix anything, but it was a good hint since I finally found the "mdns_adv" setting in the libvirtd.conf file and uncommenting it did finally squash avahi-daemon :-).
I'm wondering if this means that libvirt should change any of its policies about auto-starting avahi-daemon, or at the very least, if there is a documentation shortcoming on why libvirt defaults to enabling this and when you might want to change that default. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On Tue, Sep 07, 2010 at 09:38:15AM -0600, Eric Blake wrote:
[adding libvir-list]
On 09/07/2010 07:42 AM, Tom Horsley wrote:
On Tue, 07 Sep 2010 13:51:09 +0100 Adam Williamson wrote:
I did find a "Should-start: avahi-daemon" comment in the libvirtd init script, so maybe that is the source.
Shouldn't be. 'Should-start' means 'if this other service is enabled, it should be started before this one': it's not a strict dependency, 'this other service MUST be started before this one'.
Yea, changing the comment there didn't fix anything, but it was a good hint since I finally found the "mdns_adv" setting in the libvirtd.conf file and uncommenting it did finally squash avahi-daemon :-).
I'm wondering if this means that libvirt should change any of its policies about auto-starting avahi-daemon, or at the very least, if there is a documentation shortcoming on why libvirt defaults to enabling this and when you might want to change that default.
libvirtd has never explicitly auto-started avahi. libvirtd uses the avahi client library and gives it a callback to be invoked whenever a connection to the avahi daemon is established. With the old init system, if avahi wasn't started on boot, the callback isn't invoked and so libvirt never registers its mdns service. The sysadmin can start avahi at any time later, and libvirt will automatically register with it. With system-d it sounds like creating the avahi client will always immediately activate the avahi service. I think there perhaps needs to be a way to prevent autostart by the avahi client library Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Tue, Sep 07, 2010 at 05:10:56PM +0100, Daniel P. Berrange wrote:
libvirtd has never explicitly auto-started avahi. libvirtd uses the avahi client library and gives it a callback to be invoked whenever a connection to the avahi daemon is established. With the old init system, if avahi wasn't started on boot, the callback isn't invoked and so libvirt never registers its mdns service. The sysadmin can start avahi at any time later, and libvirt will automatically register with it. With system-d it sounds like creating the avahi client will always immediately activate the avahi service. I think there perhaps needs to be a way to prevent autostart by the avahi client library
Can we get this in bugzilla? -- Matthew Miller <mattdm@mattdm.org> Senior Systems Architect -- Instructional & Research Computing Services Harvard School of Engineering & Applied Sciences

On 09/08/2010 03:00 AM, Matthew Miller wrote:
On Tue, Sep 07, 2010 at 05:10:56PM +0100, Daniel P. Berrange wrote:
libvirtd has never explicitly auto-started avahi. libvirtd uses the avahi client library and gives it a callback to be invoked whenever a connection to the avahi daemon is established. With the old init system, if avahi wasn't started on boot, the callback isn't invoked and so libvirt never registers its mdns service. The sysadmin can start avahi at any time later, and libvirt will automatically register with it. With system-d it sounds like creating the avahi client will always immediately activate the avahi service. I think there perhaps needs to be a way to prevent autostart by the avahi client library
Can we get this in bugzilla?
What's the best wording for this, and which component should it be assigned to? From reading the above, it kind of sounds like an interaction problem with "system-d", and sounds like other things may have similar interaction problems with it. ?

On Thu, Sep 16, 2010 at 03:21:47AM +1000, Justin Clift wrote:
Can we get this in bugzilla? What's the best wording for this, and which component should it be assigned to?
Maybe two bugs, one against systemd referencing the general interaction problem, and a linked one giving the specific avahi problem? -- Matthew Miller <mattdm@mattdm.org> Senior Systems Architect -- Instructional & Research Computing Services Harvard School of Engineering & Applied Sciences

On 09/16/2010 03:30 AM, Matthew Miller wrote:
On Thu, Sep 16, 2010 at 03:21:47AM +1000, Justin Clift wrote:
Can we get this in bugzilla? What's the best wording for this, and which component should it be assigned to?
Maybe two bugs, one against systemd referencing the general interaction problem, and a linked one giving the specific avahi problem?
Thanks Matthew. Went and read the email chain, then created a bug against systemd: https://bugzilla.redhat.com/show_bug.cgi?id=634532 Tom, you're CC'd in it. Apologies for spelling your name incorrectly in it, only realised after submitting. :/ Created just the one bug, as it sounds like systemd behaving differently than intended. i.e. regression type of thing If that turns out to be "as intended" though, they can reassign it to the libvirt team. :) Regards and best wishes, Justin Clift

On 09/16/2010 07:29 PM, Justin Clift wrote:
On 09/16/2010 03:30 AM, Matthew Miller wrote:
On Thu, Sep 16, 2010 at 03:21:47AM +1000, Justin Clift wrote:
Can we get this in bugzilla? What's the best wording for this, and which component should it be assigned to?
Maybe two bugs, one against systemd referencing the general interaction problem, and a linked one giving the specific avahi problem?
Following up on this, the problem was with avahi, and Michal Schmidt has posted a patch to fix the problem. Looks like it's on the way to being resolved soon. :)
participants (4)
-
Daniel P. Berrange
-
Eric Blake
-
Justin Clift
-
Matthew Miller