Bug 309132

Summary: avahi-daemon and avahi-dnsconfd claims to be dead after boot.
Product: [openSUSE] openSUSE 10.3 Reporter: Ladislav Michnovic <lmichnovic>
Component: GNOMEAssignee: Mauro Parra Miranda <mauro>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: sbrabec
Version: Beta 3   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Patch for this bug, according to jpr's comment.
Patch for this bug, according to jpr's comment.

Description Ladislav Michnovic 2007-09-10 09:41:30 UTC
I have installed my computer and chacked these daemons if they are running:
/etc/init.d/avahi-daemon status
Checking for Avahi daemon:                             dead
/etc/init.d/avahi-dnsconfd status
Checking for Avahi DNS Configuration daemon:                      dead

but they are not running.
Comment 1 JP Rosevear 2007-09-10 14:46:57 UTC
jpr@rook:~> /etc/init.d/avahi-daemon status
Checking for Avahi daemon: Failed to open PID file: Permission denied
                                                                      dead
jpr@rook:~> /etc/init.d/avahi-daemon status
Checking for Avahi daemon: Failed to open PID file: Permission denied
                                                                      dead

Its not actually dead.  The pid file is just not accessible because avahia-daemon via libdaemon tries to open it read/write instead of just read as a regular user when passed the -c option.
Comment 3 JP Rosevear 2007-09-10 14:51:01 UTC
Lowering severity, since the daemons aren't actually dead.
Comment 4 JP Rosevear 2007-09-10 17:22:21 UTC
From lennart upstream:

If I remember correctly I open it as RDWR there because of a limitation
of the file locking APIs on some OSes, where locking files you don't
have opened as O_RDWR doesn't work.

However, I agree that the bug report mentioned is worth fixing. So it
might be advisable to add some code to reopen the file as O_RDONLY if
O_RDWR fails, and also to try F_RDLCK as a fallback if F_WRLCK
fails. That should be reasonably safe even on more exotic OSes.

If have prepared a patch for this in SVN r131 (although I didn't test
it) If this works for you I will ship this in the next release of
Comment 5 Gary Ekker 2007-09-11 17:23:12 UTC
Mauro can you get this patch in before the end of this week?
Comment 6 JP Rosevear 2007-09-11 17:23:33 UTC
The patch is actually for libdaemon FYI.
Comment 7 Mauro Parra Miranda 2007-09-13 20:50:58 UTC
Created attachment 163991 [details]
Patch for this bug, according to jpr's comment.
Comment 8 Mauro Parra Miranda 2007-09-13 20:56:16 UTC
Applied patch suggested in comment #4. Submitted and tested --for compilation-- via abuild & mbuild. 

In sake of completness, the patch was added to the bug.

Test packages available here: 

http://w3.suse.de/~mauro/bnc-309192/
Comment 9 Mauro Parra Miranda 2007-09-13 21:00:05 UTC
The right url is: 

http://w3.suse.de/~mauro/bnc-309132/
Comment 10 Mauro Parra Miranda 2007-09-13 21:03:12 UTC
Created attachment 163993 [details]
Patch for this bug, according to jpr's comment.