[SRU] clvm start error missing /var/run/lvm

Bug #959218 reported by ITec
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lvm2 (Ubuntu)
Fix Released
Undecided
Andres Rodriguez
Precise
Fix Released
Undecided
Unassigned
Quantal
Fix Released
Undecided
Andres Rodriguez

Bug Description

[Impact]
This problem impacts cLVM in every use case. Before starting cLVM doesn't create /var/run/clvm. This is true for cLVM standalone and cLVM resource agent.

[Development Fix]
There is not fix in Ubuntu-Q, since it's not open yet.

[Stable Fix]
Proposed fix is a minimal change for cLVM init scrit and cLVM RA. In both cases, before starting the daemon, /var/run/lvm is created in case it doesn't exist already.

[Test Case]
1. Install Ubuntu 12.04
2. Install clvm package
3. Reboot the system
4. Without the patch, clvmd won't be running

[Regression Potential]
Without the patch, clvmd can't start at all. There are no known regressions that might be caused by creating /var/run/lvm directory.

[Original report]

ubuntu: 12.04 precise
clvm: 2.02.66-4ubuntu7

"/etc/init.d/clvm start" fails because clvm is missing "/var/run/lvm" directory.

Possible solution:
Add "mkdir -p /var/run/lvm" to "do_start()"-Function in "/etc/init.d/clvm"-Script

Related branches

Revision history for this message
Ante Karamatić (ivoks) wrote :

Fix for this bug was just uploaded to dput ppa:ivoks/ha. Please test the fix and report results.

Thank you!

Changed in lvm2 (Ubuntu):
status: New → Confirmed
assignee: nobody → Ante Karamatić (ivoks)
Revision history for this message
ITec (itec) wrote :

Yes! This works fine!
Thanks Ante!

Best regards
Christian

Ante Karamatić (ivoks)
summary: - clvm start error missing /var/run/lvm
+ [SRU] clvm start error missing /var/run/lvm
Revision history for this message
Ante Karamatić (ivoks) wrote :
description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello ITec, or anyone else affected,

Accepted lvm2 into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in lvm2 (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
ITec (itec) wrote :

Hi Martin,

I could verify your fix.

I downgraded all my packages manually to "Ubuntu:12.04/precise".
Then I added "Ubuntu:12.04/precise-proposed" to /etc/apt/sources.list.

# rmdir /var/run/lvm

# apt-get update
# apt-get install lvm2

# dpkg -l clvm lvm2
ii clvm 2.02.66-4ubuntu7.1
ii lvm2 2.02.66-4ubuntu7.1

On the 1st node:

# /etc/init.d/clvm start
 * Starting Cluster LVM Daemon clvm [fail]
 * Activating all VGs
  6 logical volume(s) in volume group "lvm" now active
# ps fax | grep clvm
 9152 ? SLsl 0:00 /usr/sbin/clvmd -T20

On the 2nd node:

# /etc/init.d/clvm start
 * Starting Cluster LVM Daemon clvm [ OK ]
 * Activating all VGs
  6 logical volume(s) in volume group "lvm" now active
# ps fax | grep clvm
26964 ? SLsl 0:00 /usr/sbin/clvmd -T20

On the 1st node:
# /etc/init.d/clvm restart
 * Deactivating VG : [ OK ]
 * Stopping Cluster LVM Daemon clvm [ OK ]
 * Starting Cluster LVM Daemon clvm [ OK ]
 * Activating all VGs
  6 logical volume(s) in volume group "lvm" now active

I suspect "vgscan" in "do_start()" to return with rc=5 when clvm is only running on one node.

# vgscan
  clvmd not running on node tuxtest2
  Unable to obtain global lock.

But clvm does still start, even without clvm on the other node.
When started on the 2nd node no "[fail]" is shown.
When restarted on the 1st node "[fail]" is shown as well.

The problem "/etc/init.d/clvm status exitcode always 0" reported in:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/988881
still persists.

Best regards
Christian

Revision history for this message
ITec (itec) wrote :

Correction:

When restarted on the 1st node _no_ "[fail]" is shown as well.

Revision history for this message
ITec (itec) wrote :

The problem "clustered lvm commands fail with "activation/monitoring=0 is incompatible with clustered Volume Group" error" reported in:
https://bugs.launchpad.net/ubuntu/+source/resource-agents/+bug/833368
still persists.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * debian/clvmd.ra:
    - create /var/run/lvm if it doesn't exist
  * debian/clvm.init:
    - create /var/run/lvm if it doesn't exist
  * (LP: #959218)
 -- Ante Karamatic <email address hidden> Wed, 25 Apr 2012 18:29:58 +0200

Changed in lvm2 (Ubuntu Precise):
status: Fix Committed → Fix Released
Changed in lvm2 (Ubuntu Quantal):
assignee: Ante Karamatić (ivoks) → Andres Rodriguez (andreserl)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Is there *any* reason why this was not uploaded to quantal first?

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Yes, there is.

Take a look to the date when this was uploaded to -proposed and when it was made available for SRU testing. The latter was on April 27th - a day *after* the release - which classifies as a 0-day SRU and was *before* Quantal was opened for development.

Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [Bug 959218] Re: [SRU] clvm start error missing /var/run/lvm

On 05/06/12 22:10, Andres Rodriguez wrote:
> Yes, there is.
>
> Take a look to the date when this was uploaded to -proposed and when it
> was made available for SRU testing. The latter was on April 27th - a day
> *after* the release - which classifies as a 0-day SRU and was *before*
> Quantal was opened for development.
>

Ok, cool. Then it is my fault of not including this in my last lvm2
upload. Sorry.

--
Regards,
Dmitrijs.

Revision history for this message
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: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.