/etc/init.d/clvm status exitcode always 0

Bug #988881 reported by ITec on 2012-04-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lvm2 (Ubuntu)
Andres Rodriguez
Dimitri John Ledkov
Andres Rodriguez

Bug Description

* Cannot use clvm as a cluster resource.

Test case:
# /etc/init.d/clvm stop; /etc/init.d/clvm status; echo $?
 * Cluster LVM Daemon is not running
# /etc/init.d/clvm start; /etc/init.d/clvm status; echo $?
 * Cluster LVM Daemon is running

Regression potential:
If there were tests out there that did pattern matching on the text and check for exit code 0, they will now fail to detect that clvm is not running (since exit code has changed to 3 now).

# /etc/init.d/clvm status ; echo $?
 * Cluster LVM Daemon is not running

/etc/init.d/clvm is showing, that Cluster LVM Daemon is not running, but it always exits with 0.
So processes that controll CLVM using "/etc/init.d/clvm status", that rely on correct exit codes, are going to fail.

In consequence it is not possible to use "/etc/init.d/clvm" as a script to a resource in "cluster.conf".

You cannot do sth. like:

   <script file="/etc/init.d/clvm" name="clvm"/>

  <service autostart="1" domain="only1" exclusive="0" name="clvm1" recovery="restart">
   <script ref="clvm"/>

ITec (itec) wrote :
ITec (itec) wrote :


# lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04

# dpkg -l clvm libdevmapper1.02.1 lvm2
ii clvm 2.02.66-4ubuntu7.1~ppa1 Cluster LVM Daemon for lvm2

The attachment "clvm-patch.diff" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in lvm2 (Ubuntu Quantal):
assignee: nobody → Andres Rodriguez (andreserl)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lvm2 - 2.02.88-2ubuntu2

lvm2 (2.02.88-2ubuntu2) quantal-proposed; urgency=low

  [ Ante Karamatic ]
  * debian/{clvmd.ra,clvm.init}:
    - create /var/run/lvm if it doesn't exist (LP: #959218)

  [ Andres Rodriguez ]
  * debian/clvm.init: exit 3 if not running on status action. (LP: #988881)
 -- Andres Rodriguez <email address hidden> Tue, 05 Jun 2012 16:30:18 -0400

Changed in lvm2 (Ubuntu Quantal):
status: New → Fix Released
Changed in lvm2 (Ubuntu Precise):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Dmitrijs Ledkovs (xnox)
description: updated
Dimitri John Ledkov (xnox) wrote :

This package has been uploaded into precise-proposed unapproved queue, pending acceptance by SRU team.

lvm2 (2.02.66-4ubuntu7.2) precise; urgency=low

  * Honour monitoring=1 config option in /etc/lvm/lvm.conf when using
    clustered VGs (LP: #833368).

  * /etc/init.d/clvm status now exits with code 3, if clvm is not running,
    as per LSB specification. (LP: #988881)

Date: Wed, 06 Feb 2013 10:34:32 +0000
Changed-By: Dmitrijs Ledkovs <email address hidden>
Maintainer: Ubuntu Core Developers <email address hidden>


 OK: lvm2_2.02.66.orig.tar.gz
 OK: lvm2_2.02.66-4ubuntu7.2.debian.tar.gz
 OK: lvm2_2.02.66-4ubuntu7.2.dsc
     -> Component: main Section: admin

Hello ITec, or anyone else affected,

Accepted lvm2 into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/lvm2/2.02.66-4ubuntu7.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lvm2 (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Dimitri John Ledkov (xnox) wrote :

Verified using precise cloud instance.

Please note that if cman & cluster is not configured (missing /etc/cluster/cluster.conf and cman_tool status exists with non-zero) then the clvm init script will exist with 0. I think this is ok, since clvm init script does depend on cman and hence it is expected for cman to be present and operational.

tags: added: verification-done verification-precise-done
removed: verification-needed

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lvm2 - 2.02.66-4ubuntu7.2

lvm2 (2.02.66-4ubuntu7.2) precise; urgency=low

  * Honour monitoring=1 config option in /etc/lvm/lvm.conf when using
    clustered VGs (LP: #833368).

  * /etc/init.d/clvm status now exits with code 3, if clvm is not running,
    as per LSB specification. (LP: #988881)
 -- Dmitrijs Ledkovs <email address hidden> Wed, 06 Feb 2013 10:34:32 +0000

Changed in lvm2 (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers