Description of problem: The qdiskd init script doesn't works as expected. Issuing a "restart" only stops the service, issuing "stop" and "start" works fine. Version-Release number of selected component (if applicable): cman-2.0.98-1.el5 How reproducible: Always Steps to Reproduce: 1.# service qdiskd restart Stopping the Quorum Disk Daemon: [ OK ] Starting the Quorum Disk Daemon: [ OK ] 2.# service qdiskd status qdiskd is stopped Actual results: qdiskq daemon doesn't start. Expected results: qdiskq daemon should be started Additional info: This behaviour has been introduced in this release due to the "status" check before starting the daemon and to the fact that the init script and the daemon have the same name.
I see. The code we added to make cman start qdiskd intelligently (to prevent quorum-waits) broke 'start'. The way I would fix this is: * record pid of qdiskd * kill (-TERM) pid * wait for pid to exit
Hi Lon, The buggy code is in the way you check the status from inside "start", not in the way you kill qdiskd: # cp -p /etc/init.d/qdiskd /etc/init.d/qdisk # service qdisk restart Stopping the Quorum Disk Daemon: [ OK ] Starting the Quorum Disk Daemon: [ OK ] # service qdisk status qdiskd (pid 22310) is running... If the daemon and the init script doesn't share the name it works fine.
Created attachment 331817 [details] Proposed fix This patch fixes this bug. I haven't defined a function for the "status" code, but if you plan to add more code to the "status" clause, may be better to define a function and call it from "status", "start" and whenever is needed.
Yeah, that would do it.
Merged to master branch.
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commit;h=ae73900ca03aae68cc84e20beedf99cf899df763 ^^ master
http://git.fedorahosted.org/git/?p=cluster.git;a=commit;h=b5e25182b52437d4c1e821cb881c6fffe4808ff8 ^^ RHEL5
Fix verified in cman-2.0.99-1.el5. [root@grant-01 ~]# cman_tool nodes Node Sts Inc Joined Name 0 M 0 2009-03-17 15:56:28 /dev/dm-5 1 M 26160 2009-03-17 15:55:40 grant-01 2 M 26168 2009-03-17 15:55:42 grant-02 3 M 26172 2009-03-17 15:55:43 grant-03 [root@grant-01 ~]# service qdiskd restart Stopping the Quorum Disk Daemon: [ OK ] Starting the Quorum Disk Daemon: [ OK ] [root@grant-01 ~]# cman_tool nodes Node Sts Inc Joined Name 0 M 0 2009-03-17 15:56:28 /dev/dm-5 1 M 26160 2009-03-17 15:55:40 grant-01 2 M 26168 2009-03-17 15:55:42 grant-02 3 M 26172 2009-03-17 15:55:43 grant-03
Cause: Running 'service qdiskd restart' Consequence: Qdiskd is not restarted correctly Fix: Fix the status check clause preventing correct restart operation Result: Qdiskd is now restarted correctly.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2009-1341.html