Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219280 - sys-cluster/drbd-8.0.11 status returns zero if module is loaded
Summary: sys-cluster/drbd-8.0.11 status returns zero if module is loaded
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-25 16:42 UTC by Alex Barker
Modified: 2013-01-17 19:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Barker 2008-04-25 16:42:55 UTC
It seems that the status function in the init script returns zero if the module is loaded regardless of the scripts status.

According to the Linux Standard Base Core Specification ( http://refspecs.linux-foundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html ) a zero should be returned when "program is running or service is OK".

Our current script will return ok if the module is loaded and the service is stopped. 

Reproducible: Always

Steps to Reproduce:
1. modprobe drbd
2. /etc/init.d/drbd status


Actual Results:  
 * status:  stopped
 * drbd driver loaded OK; device status: ...     [ ok ]
version: 8.0.11 (api:86/proto:86)
GIT-hash: b3fe2bdfd3b9f7c2f923186883eb9e2a0d3a5b1b build by root@localhost, 2008-04-18 11:35:09


Expected Results:  
 * status:  stopped
 * drbd not loaded ...     [ !! ]


This really isnt that big of an issue except that it causes problems with heartbeat loading the gentoo version of the init.d script.
Comment 1 Luca Lesinigo 2011-04-26 22:36:27 UTC
this version of DRBD is no longer in portage, and the current stable one is of a different branch (8.3.x). Maybe this BR does no longer apply?
Comment 2 Zentoo 2012-11-15 09:51:55 UTC
I hope I'minthe right place for the following. I prefer to do not open a new bug since it's really related to this one.

If the kernel have support of drbd shipped in but not as a module then init.d/stop warn about:

#  /etc/init.d/drbd stop
 * Stopping all DRBD resources ...
grep: /proc/modules: No such file or directory


So the check should work on /proc/drbd that tell if drbd support exists or not.
In add, if there is a mismatch between version of kernel and userland drbd support, you could have warning and drbd kernel version in /proc/drbd too.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-01-17 19:09:21 UTC
InCVS.