ocf RA for lxc doesn't work

Bug #998136 reported by sdx23
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
resource-agents (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned

Bug Description

The OCF RA for LXC-Containers does not work as expected - better to say: it does not work at all.

This is caused by some mistakes within /usr/lib/ocf/resource.d/heartbeat/lxc

1. LXC_status expects not the output lxc-info provides, fixed in line 244 by:
    if [[ "$S" =~ "RUNNING" ]] ; then
2. lxc-ps expects the ps-options not directly but seperated by -- in lines 194, 201
    lxc-ps -- -C ...

this will work correctly as far as I've tested for now.

regards,
max

version-information:

resource-agents:
  Installed: 1:3.9.2-5ubuntu4
  Candidate: 1:3.9.2-5ubuntu4

lxc:
  Installed: 0.7.5-3ubuntu53
  Candidate: 0.7.5-3ubuntu53

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"

sdx23 (sdx23)
description: updated
Revision history for this message
Christoph Mitasch (cmitasch) wrote :

Hello,

I can confirm the bug.

The latest GIT version has already fixed that:
https://raw.github.com/ClusterLabs/resource-agents/master/heartbeat/lxc

Here is the diff:
--- lxc.orig 2012-04-17 00:23:21.000000000 +0200
+++ lxc 2012-05-15 19:13:37.882415213 +0200
@@ -239,7 +239,10 @@
 }

 LXC_status() {
- S=`lxc-info -n ${OCF_RESKEY_container}`
+ # run lxc-info with -s option for LXC-0.7.5 or later
+ local lxc_info_opt="-s"
+ ocf_version_cmp "`lxc-version | cut -d' ' -f 3`" 0.7.5 && lxc_info_opt=""
+ S=`lxc-info $lxc_info_opt -n ${OCF_RESKEY_container}`
  ocf_log debug "State of ${OCF_RESKEY_container}: $S"
  if [[ "${S##* }" = "RUNNING" ]] ; then
   return $OCF_SUCCESS

Please push to upstream!

Thank you,
Christoph

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in resource-agents (Ubuntu):
status: New → Confirmed
Revision history for this message
Christoph Mitasch (cmitasch) wrote :

Hello,

what can be done to push this fix into Ubuntu?

Thank you,
Christoph

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Thank you for taking the time to report this bug. In an effort to keep an
up-to-date and valid list of bugs to work on, I have reviewed this report
to verify it still requires effort and occurs on an Ubuntu release in
standard support, and it does not.

It is unfortunate that we were unable to resolve this defect, however
there appears to be no further action possible at this time. I am
therefore moving the bug to 'Incomplete'. If you disagree or have
new information, we would be grateful if you could please add a comment
stating why and then change the status of the bug to 'New'.

Changed in resource-agents (Ubuntu Precise):
status: New → Won't Fix
Changed in resource-agents (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Marking it as won't fix because of the EOL for Precise.

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.