[Bug 640336] New: network:dhcp: Init script "rc.dhcpd" not fully LSB compliant
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c0 Summary: network:dhcp: Init script "rc.dhcpd" not fully LSB compliant Classification: openSUSE Product: openSUSE.org Version: unspecified Platform: Other OS/Version: SLES 11 Status: NEW Severity: Normal Priority: P5 - None Component: 3rd party software AssignedTo: mt@novell.com ReportedBy: joschibrauchle@gmx.de QAContact: opensuse-communityscreening@forge.provo.novell.com Found By: --- Blocker: --- The init script "rc.dhcpd" is not fully LSB compliant. When the executable of configuration file of the dhcp server is not found in the beginning of the init script, it returns exit 5 or 6 respectively, which is not valid if the "status" parameter was given. The problem arises in a Heartbeat/Linux-HA configuration, where the Heartbeat service runs a ressource monitor using "rcdhcpd status" to check the status of this ressource. If the configuration file is not available at the time this command is run (e.g. when the configuration file is on an DRBD device which is not (yet) mounted), then the exit code of "6" will cause the Heartbeat monitor to fail, as this exit code is not expected from the "status" parameter! Here are the corresponding lines (98 to 107) in "rc.dhcpd": if ! [ -x "$DAEMON_BIN" ]; then if [ "$1" = "stop" ]; then exit 0; fi echo >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting." exit 5 fi if ! [ -r "$DAEMON_CONF" ] ; then if [ "$1" = "stop" ]; then exit 0; fi echo >&2 "$0: \"$DAEMON_CONF\" config file missed. Exiting." exit 6 fi -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c1 --- Comment #1 from Joschi Brauchle <joschibrauchle@gmx.de> 2010-09-18 08:35:13 UTC --- Possible patch: --- rc.dhcpd +++ rc.dhcpd @@ -95,15 +95,17 @@ # with force-reload (in case signalling is not supported) are # considered a success. -if ! [ -x "$DAEMON_BIN" ]; then - if [ "$1" = "stop" ]; then exit 0; fi - echo >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting." - exit 5 -fi -if ! [ -r "$DAEMON_CONF" ] ; then - if [ "$1" = "stop" ]; then exit 0; fi - echo >&2 "$0: \"$DAEMON_CONF\" config file missed. Exiting." - exit 6 +if ! [ "$1" = "status" ]; then + if ! [ -x "$DAEMON_BIN" ]; then + if [ "$1" = "stop" ]; then exit 0; fi + echo >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting." + exit 5 + fi + if ! [ -r "$DAEMON_CONF" ] ; then + if [ "$1" = "stop" ]; then exit 0; fi + echo >&2 "$0: \"$DAEMON_CONF\" config file missed. Exiting." + exit 6 + fi fi # remove empty pid files to avoid disturbing warnings by checkproc/killproc -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c2 Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Version|unspecified |Final InfoProvider| |ro@novell.com Component|3rd party software |Other CC| |radmanic@suse.de, | |werner@novell.com Product|openSUSE.org |openSUSE 11.3 --- Comment #2 from Marius Tomaschewski <mt@novell.com> 2010-09-20 08:33:35 UTC --- OK, the codes 5 and 6 are reserved by LSB in status and the dhcpd binary started by the service before may, still run. When a service gets uninstalled, the service is stopped and the binary _and_ the init script removed via rpm scripts. The easiest (only?) way to trigger the problem is to just remove the config file without to stop/uninstall the service. Question is, if this is a bug -- that exists in any service / init script we ship as well as in /etc/init.d/skeleton, or it has to be resolved as INVALID [WONTFIX] because it is incorrect use similar to e.g. a "chmod -x $binary" ? Rüdiger, Werner, what do you say? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c3 Ludwig Nussel <lnussel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |garloff@novell.com, | |kukuk@novell.com, | |lnussel@novell.com --- Comment #3 from Ludwig Nussel <lnussel@novell.com> 2010-09-29 13:01:08 CEST --- Interesting case. Looks like a misbehavior of the scripts, even though the state of server running but config absent is weird. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c4 --- Comment #4 from Marius Tomaschewski <mt@novell.com> 2010-09-29 11:28:28 UTC --- Whether the service is running or not is finally irrelevant. As soon as the config file is removed, wrong status codes are returned. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c5 --- Comment #5 from Marius Tomaschewski <mt@novell.com> 2010-09-29 12:34:40 UTC --- Created an attachment (id=392102) --> (http://bugzilla.novell.com/attachment.cgi?id=392102) Proposed patch with more exact return codes I'd prefer this patch instead of one in comment 1. In case there is no executable binary: stop -> code 0 (success) the service may still run, but we can't stop it using killproc. => use rpm -e or similar to deinstall properly "chmod -x $binary" or "mv $binary ..." => unsupported case. status -> code 4 (service status unknown) the service may still run, but we can't stop find it using checkproc. checkproc would return code 5 here => IMO a bug * -> code 5 (program is not installed) In case of missed dhcpd.conf: stop -> killproc return code check for chroot pid file when /etc/sysconfig/dhcpd is missed too status -> checkproc return code check for chroot pid file when /etc/sysconfig/dhcpd is missed too * -> code 6 (program is not configured) Comments? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |643433 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|643433 | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c6 Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED InfoProvider|ro@novell.com | --- Comment #6 from Marius Tomaschewski <mt@novell.com> 2010-10-26 12:20:51 UTC --- timeout ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c9 manfred danzer <manfred.danzer@tum.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manfred.danzer@tum.de --- Comment #9 from manfred danzer <manfred.danzer@tum.de> 2010-10-26 14:12:59 UTC --- Actually, I just tested your patch today on our HA cluster. Works nicely! :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c11 --- Comment #11 from Marius Tomaschewski <mt@novell.com> 2010-10-26 14:50:36 UTC --- (In reply to comment #9)
Actually, I just tested your patch today on our HA cluster. Works nicely! :-)
Thanks! I'm going to prepare fixed package in my collection/branch first [there are also another reports for the dhcp package I've to review]: http://download.opensuse.org/repositories/home:/mtomaschewski:/branches:/ope... and finally request a submit into :Update:Test. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c12 Swamp Workflow Management <swamp@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard| |maint:running:40346:low --- Comment #12 from Swamp Workflow Management <swamp@suse.com> 2011-04-18 13:54:46 UTC --- The SWAMPID for this issue is 40346. This issue was rated as low. Please submit fixed packages until 2011-05-16. Also create a patchinfo file using this link: https://swamp.suse.de/webswamp/wf/40346 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c13 Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #13 from Marius Tomaschewski <mt@novell.com> 2011-04-28 08:45:52 UTC --- Fixed SLE-11-SP1 dhcp-3.x package (request were 11595) and patchinfo for SWAMPID 40346 is submitted. The dhcp-4.x packages on openSUSE-11.3 and 11.4 already this fix before. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c14 Swamp Workflow Management <swamp@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard|maint:running:40346:low |maint:running:40346:low | |maint:released:sle11-sp1:40 | |375 --- Comment #14 from Swamp Workflow Management <swamp@suse.com> 2011-06-09 11:37:19 UTC --- Update released for: dhcp, dhcp-client, dhcp-debuginfo, dhcp-debugsource, dhcp-devel, dhcp-relay, dhcp-server Products: SLE-DEBUGINFO 11-SP1 (i386, ia64, ppc64, s390x, x86_64) SLE-DESKTOP 11-SP1 (i386, x86_64) SLE-SDK 11-SP1 (i386, ia64, ppc64, s390x, x86_64) SLE-SERVER 11-SP1 (i386, ia64, ppc64, s390x, x86_64) SLES4VMWARE 11-SP1 (i386, x86_64) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=640336 https://bugzilla.novell.com/show_bug.cgi?id=640336#c Swamp Workflow Management <swamp@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard|maint:running:40346:low |. |maint:released:sle11-sp1:40 | |375 | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com