Bug 600430 - Correct avahi-daemon and avahi-dnsconfd use of PIDFILE
Correct avahi-daemon and avahi-dnsconfd use of PIDFILE
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: avahi (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Lennart Poettering
Fedora Extras Quality Assurance
:
: 522078 527674 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-04 13:11 EDT by James Laska
Modified: 2013-09-02 02:49 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-24 21:27:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/etc/init.d/avahi-daemon.patch (1.79 KB, patch)
2010-06-04 13:11 EDT, James Laska
no flags Details | Diff
/etc/init.d/avahi-dnsconfd.patch (1.91 KB, patch)
2010-06-04 13:11 EDT, James Laska
no flags Details | Diff
/etc/init.d/avahi-daemon.patch (1.79 KB, patch)
2010-06-09 07:36 EDT, James Laska
no flags Details | Diff

  None (edit)
Description James Laska 2010-06-04 13:11:18 EDT
Created attachment 421300 [details]
/etc/init.d/avahi-daemon.patch

Description of problem:

According to the Fedora SysVinitscript documentation [1], avahi-daemon and avahi-dnsconfd do not return the expected exit codes for certain operations. 

I have attached a patches that correct the behavior by making use of the built-in killproc and daemon functions.

[1] https://fedoraproject.org/wiki/PackagingSysVInitScript#Exit_Codes_for_the_Status_Action

Version-Release number of selected component (if applicable):
 * avahi-0.6.25-6.fc13.x86_64

How reproducible:
 * 100%

Steps to Reproduce:
1. Run the AutoQA beakerlib-based avahi initscript test (see instructions at
https://fedorahosted.org/autoqa/wiki/initscripts)

Actual Results (same for avahi-daemon and avahi-dnsconfd):

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: avahi-daemon - start
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] ::  Service must start without problem
:: [   PASS   ] ::  Then Status command 
:: [   FAIL   ] ::  Already started service  (Expected 0, got 255)
:: [   PASS   ] ::  Again status command 
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 3 good, 1 bad
:: [   FAIL   ] :: RESULT: avahi-daemon - start

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: avahi-daemon - stop
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] ::  Stopping service 
:: [   FAIL   ] ::  Status of stopped service  (Expected 3, got 1)
:: [   FAIL   ] ::  Stopping service again  (Expected 0, got 255)
:: [   FAIL   ] ::  Status of stopped service  (Expected 3, got 1)
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 1 good, 3 bad
:: [   FAIL   ] :: RESULT: avahi-daemon - stop

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: avahi-daemon - pid
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'touch /var/run/avahi-daemon/pid'
:: [   FAIL   ] ::  Existing pid file, but service not started  (Expected 1, got 0)
:: [   PASS   ] :: Remove .pid file
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 2 good, 1 bad
:: [   FAIL   ] :: RESULT: avahi-daemon - pid

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: avahi-daemon - lock
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'touch /var/lock/subsys/avahi-daemon'
:: [   FAIL   ] ::  Existing lock file, but service not started  (Expected 2, got 1)
:: [   PASS   ] :: Remove lock file
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 2 good, 1 bad
:: [   FAIL   ] :: RESULT: avahi-daemon - lock


Expected Results:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: avahi-daemon - start
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] ::  Service must start without problem
:: [   PASS   ] ::  Then Status command 
:: [   PASS   ] ::  Already started service 
:: [   PASS   ] ::  Again status command 
:: [   LOG    ] :: Duration: 2s
:: [   LOG    ] :: Assertions: 4 good, 0 bad
:: [   PASS   ] :: RESULT: avahi-daemon - start

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: avahi-daemon - stop
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] ::  Stopping service 
:: [   PASS   ] ::  Status of stopped service 
:: [   PASS   ] ::  Stopping service again 
:: [   PASS   ] ::  Status of stopped service 
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 4 good, 0 bad
:: [   PASS   ] :: RESULT: avahi-daemon - stop

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: avahi-daemon - pid
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'touch /var/run/avahi-daemon/pid'
:: [   PASS   ] ::  Existing pid file, but service not started 
:: [   PASS   ] :: Remove .pid file
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 3 good, 0 bad
:: [   PASS   ] :: RESULT: avahi-daemon - pid

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: avahi-daemon - lock
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'touch /var/lock/subsys/avahi-daemon'
:: [   PASS   ] ::  Existing lock file, but service not started 
:: [   PASS   ] :: Remove lock file
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 3 good, 0 bad
:: [   PASS   ] :: RESULT: avahi-daemon - lock
Comment 1 James Laska 2010-06-04 13:11:36 EDT
Created attachment 421301 [details]
/etc/init.d/avahi-dnsconfd.patch
Comment 2 James Laska 2010-06-09 07:36:50 EDT
Created attachment 422508 [details]
/etc/init.d/avahi-daemon.patch

Oops, I attached reversed patches.  Reattaching correct patches.
Comment 3 Lennart Poettering 2010-06-24 21:27:17 EDT
Merged upstream now. Will soon upload a new version to rawhide.
Comment 4 Lennart Poettering 2010-06-24 21:42:55 EDT
*** Bug 527674 has been marked as a duplicate of this bug. ***
Comment 5 Lennart Poettering 2010-06-24 21:45:03 EDT
*** Bug 522078 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.