[Debian-ha-maintainers] Bug#815346: crmsh: add multiarch support in config.py (libdir)

Daniel Hoffend dh at dotlan.net
Sat Feb 20 22:49:20 UTC 2016


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 at 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 at 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 at 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 at 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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4392cd7a2ac37034795f45c369ffce52f379a05e.patch
Type: text/x-diff
Size: 1430 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-ha-maintainers/attachments/20160220/b132c3a0/attachment.patch>


More information about the Debian-ha-maintainers mailing list