Package: resource-agents
Version: 1:3.9.7-1~bpo8+1
Severity: normal
Tags: upstream patch

The 'Xen' agent /usr/lib/ocf/resource.d/heartbeat/Xen attempts to detect if the 
'xm' toolset is being used
instead of the newer 'xl', but it doesn't work. Simply because 'xl' command 
exists, doesn't mean it actually works.
On my system, it exits with "ERROR:  A different toolstack (xm) have been 
selected!".

This completely breaks the resource agent when 'xm' is being used. Here's a 
workin, though not very pretty, way to detect it:

--- Xen.orig    2017-02-05 19:11:03.802980009 +0200
+++ Xen 2017-02-05 19:16:54.558646403 +0200
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 #
 # Support:      linux...@lists.linux-ha.org
@@ -45,7 +45,7 @@
 : ${OCF_RESKEY_reserved_Dom0_memory=512}

 # prefer xl
-xentool=$(which xl 2> /dev/null || which xm)
+xentool=$(((xl |& grep -q -v "ERROR") && which xl 2> /dev/null)|| which xm)

 meta_data() {
        cat <<END



-- System Information:
Debian Release: 8.7
  APT prefers stable
  APT policy: (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages resource-agents depends on:
ii  cluster-glue  1.0.12~rc1+hg2777-1.2
ii  libc6         2.21-6
ii  libglib2.0-0  2.48.0-1~bpo8+1
ii  libnet1       1.1.6+dfsg-3
ii  libplumb2     1.0.12~rc1+hg2777-1.2
ii  libplumbgpl2  1.0.12~rc1+hg2777-1.2
ii  python        2.7.9-1

resource-agents recommends no packages.

resource-agents suggests no packages.

-- no debconf information

Reply via email to