Bug 541254

Summary: bacula initscripts lsb compliance
Product: [Fedora] Fedora Reporter: Yulia Kopkova <ykopkova>
Component: baculaAssignee: Andreas Thienemann <andreas>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: andreas, dkovalsk, fschwarz, gwync, mmcgrath
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: bacula-5.0.2-5.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 587254 (view as bug list) Environment:
Last Closed: 2010-06-24 16:32:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 521669, 587254    

Description Yulia Kopkova 2009-11-25 11:55:50 UTC
Description of problem:

According to https://fedoraproject.org/wiki/Packaging/SysVInitScript bacula
component init scripts have some lsb compliance issues:

SERVICE in bacula-dir bacula-fd bacula-sd

1. Init script should return code "4" if restarting service under
nonprivileged user:
# su testuserqa -c "service $SERVICE restart"; echo $?
Shutting down $SERVICE:                                   [FAILED]
rm: cannot remove `/var/lock/subsys/$SERVICE': Permission denied
Starting $SERVICE: grep: /etc/bacula/$SERVICE.conf: Permission denied
25-Nov 12:22 $SERVICE: ERROR TERMINATION at parse_conf.c:881
Config error: Cannot open config file "/etc/bacula/$SERVICE.conf": Permission denied

                                                           [FAILED]
0
now: 0 
expected: 4 

2. force-reload action should be supported

3. try-restart action should be supported

4. nonexist action should have returncode 2:
    # service $SERVICE nonexist ; echo $?
    Usage: $SERVICE {start|stop|status|reload|restart}
1
now: 1
expected: 2  

5. Initscript should return code "1", when program is dead and /var/run pid file exists 
#service bacula-sd restart
Shutting down bacula-sd:                                   [  OK  ]
Starting bacula-sd:                                        [  OK  ]
# ps ax | grep bacula-sd
11975 ?        Ssl    0:00 bacula-sd -c /etc/bacula/bacula-sd.conf
# kill -11 11975     
# ls -l /var/run/bacula-sd*
-rw-r-----. 1 root root 6 2009-11-25 12:44 /var/run/bacula-sd.9103.pid
# service bacula-sd status ; echo $?
bacula-sd dead but subsys locked ->> it should be "bacula-sd dead but pid file exists"
2
now: 2
expected: 1

# touch /var/run/bacula-sd.pid
# service bacula-sd status ; echo $?
bacula-sd dead but pid file exists
1

Seems, bacula-sd, bacula-dir and bacula-fd initscripts should make check with /var/run/bacula-{sd.9103,dir.1901,fd.1902}.pid files but not with /var/run/bacula-{sd,dir,fd}.pid

Comment 2 Fedora Update System 2010-06-03 12:37:48 UTC
bacula-5.0.2-5.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/bacula-5.0.2-5.fc13

Comment 3 Fedora Update System 2010-06-04 18:50:28 UTC
bacula-5.0.2-5.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bacula'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/bacula-5.0.2-5.fc13

Comment 4 Fedora Update System 2010-06-24 16:32:08 UTC
bacula-5.0.2-5.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.