Package: crmsh
Version: 2.2.0-1
Severity: important
Tags: upstream newcomer patch
Dear Maintainer,
I've encountered a problem that makes crmsh unsuble after a default
installation. Basically the verify process inside a crmsh configure session
leads fails which makes it impossible to change anything.
root@cluster-a:~# crm configure verify ; echo $?
ERROR: stonithd:metadata: got no meta-data, does this RA exist?
ERROR: crmd:metadata: got no meta-data, does this RA exist?
ERROR: cib-bootstrap-options: attribute have-watchdog does not exist
ERROR: cib-bootstrap-options: attribute stonith-enabled does not exist
ERROR: cib-bootstrap-options: attribute no-quorum-policy does not exist
ERROR: pengine:metadata: got no meta-data, does this RA exist?
1
The reason behind this is that crmsh is trying to find the crmd executble
in the PATH variable (which gets extended by libdir during envsetup).
But crmsh is missing the multiarch directories ín debian.
root@cluster-a:~# strace -f crm configure verify 2>&1 | grep crmd
stat("/usr/local/sbin/crmd", 0x7fffa93dd440) = -1 ENOENT (No such file or
directory)
stat("/usr/local/bin/crmd", 0x7fffa93dd440) = -1 ENOENT (No such file or
directory)
stat("/usr/sbin/crmd", 0x7fffa93dd440) = -1 ENOENT (No such file or
directory)
stat("/usr/bin/crmd", 0x7fffa93dd440) = -1 ENOENT (No such file or
directory)
stat("/sbin/crmd", 0x7fffa93dd440) = -1 ENOENT (No such file or
directory)
stat("/bin/crmd", 0x7fffa93dd440) = -1 ENOENT (No such file or
directory)
stat("/usr/lib64/pacemaker/crmd", 0x7fffa93dd440) = -1 ENOENT (No such file
or directory)
stat("/usr/local/sbin/crmd", 0x7fffa93dbcd0) = -1 ENOENT (No such file or
directory)
stat("/usr/local/bin/crmd", 0x7fffa93dbcd0) = -1 ENOENT (No such file or
directory)
stat("/usr/sbin/crmd", 0x7fffa93dbcd0) = -1 ENOENT (No such file or
directory)
stat("/usr/bin/crmd", 0x7fffa93dbcd0) = -1 ENOENT (No such file or
directory)
stat("/sbin/crmd", 0x7fffa93dbcd0) = -1 ENOENT (No such file or
directory)
stat("/bin/crmd", 0x7fffa93dbcd0) = -1 ENOENT (No such file or
directory)
stat("/usr/lib64/pacemaker/crmd", 0x7fffa93dbcd0) = -1 ENOENT (No such file
or directory)
write(2, "ERROR: crmd:metadata: got no met"..., 59ERROR: crmd:metadata: got
no meta-data, does this RA exist?) = 59
The path configuration in question is located at (combiend with $PATH)
root@cluster-a:~# grep -A1 libdir.:
/usr/lib/python2.7/dist-packages/crmsh/config.py
'libdir': ('/usr/lib64', '/usr/libexec', '/usr/lib',
'/usr/local/lib64', '/usr/local/libexec', '/usr/local/lib'),
A quick verification is to append the crmd directory to the PATH variable.
root@cluster-a:~# PATH=/usr/lib/x86_64-linux-gnu/pacemaker/:$PATH crm
configure verify ; echo $?
0
The fix (to include additional directories in the libdir list) has been
reported and accepted upstream.
https://github.com/ClusterLabs/crmsh/commit/4392cd7a2ac37034795f45c369ffce52f379a05e
Here's a verifcation that the patch actually works
cat 4392cd7a2ac37034795f45c369ffce52f379a05e.patch | patch -p2 -d
/usr/lib/python2.7/dist-packages/crmsh/
patching file config.py
root@cluster-a:~# crm configure verify ; echo $?
0
Please add the patch to the patch/series file until the next upstream
version gets released.
To test all this I've used a Debian Jessie base systems with the cluster
packages installed from testing and/or from niif. In both cases I had
problems with crmsh 2.2 while 2.1 worked.
--
Regards
Daniel Hoffend
-- System Information:
Debian Release: 8.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/2 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: systemd (via /run/systemd/system)
Versions of packages crmsh depends on:
ii pacemaker-cli-utils 1.1.14-2~bpo8+1
ii python-lxml 3.4.0-1
ii python-yaml 3.11-2
ii python2.7 2.7.9-2
pn python:any <none>
Versions of packages crmsh recommends:
ii pacemaker 1.1.14-2~bpo8+1
crmsh suggests no packages.
-- debconf-show failed
>From 4392cd7a2ac37034795f45c369ffce52f379a05e Mon Sep 17 00:00:00 2001
From: Daniel Hoffend <[email protected]>
Date: Sat, 20 Feb 2016 16:19:28 +0100
Subject: [PATCH] medium: config: add multiarch support for libdir
Debian and Ubuntu doesn't use the directory /usr/lib64. They switched to
a different directory structure for better multiarch support.
This also fixes a problem where crmsh can't find crmd on recent
Debian/Ubuntu 64bit installations (same as in #67) because the
autodetection doesn't find the correct crm_daemon_dir path
References:
* https://wiki.debian.org/Multiarch/
* https://wiki.ubuntu.com/MultiarchSpec
---
modules/config.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/config.py b/modules/config.py
index 25eaea7..82d09f5 100644
--- a/modules/config.py
+++ b/modules/config.py
@@ -19,7 +19,9 @@
_PATHLIST = {
'datadir': ('/usr/share', '/usr/local/share', '/opt'),
'cachedir': ('/var/cache', '/opt/cache'),
- 'libdir': ('/usr/lib64', '/usr/libexec', '/usr/lib',
+ 'libdir': ('/usr/lib64', '/usr/lib/x86_64-linux-gnu', '/usr/lib/i386-linux-gnu',
+ '/usr/libexec', '/usr/lib', '/usr/local/lib64',
+ '/usr/local/lib/x86_64-linux-gnu', '/usr/local/lib/i386-linux-gnu',
'/usr/local/lib64', '/usr/local/libexec', '/usr/local/lib'),
'varlib': ('/var/lib', '/opt/var/lib'),
'wwwdir': ('/srv/www', '/var/www')