[Debian-ha-maintainers] Bug#934519: fence-agents: FTBFS in stretch/buster/sid (ImportError: No module named pywsman)

Santiago Vila sanvila at debian.org
Sun Aug 11 23:00:51 BST 2019


Package: src:fence-agents
Version: 4.0.25-1
Severity: serious
Tags: ftbfs patch

Dear maintainer:

I tried to build this package in stretch but it failed:

--------------------------------------------------------------------------------
[...]
 debian/rules build-arch
dh build-arch --with python2 --with autoreconf
   dh_testdir -a
   dh_update_autotools_config -a
   debian/rules override_dh_autoreconf
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_autoreconf ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I make -I m4
configure.ac:70: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2601: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2617: AC_COMPILE_IFELSE is expanded from...

[... snipped ...]

xsltproc ../../fence/agents/lib/fence2wiki.xsl apc_snmp/.fence_apc_snmp.8.tmp | grep -v '<?xml' > apc_snmp/fence_apc_snmp.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python ifmib/fence_ifmib -o metadata > ifmib/.fence_ifmib.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng ifmib/.fence_ifmib.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl ifmib/.fence_ifmib.8.tmp > ifmib/fence_ifmib.8
ifmib/.fence_ifmib.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl ifmib/.fence_ifmib.8.tmp | grep -v '<?xml' > ifmib/fence_ifmib.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python ibmblade/fence_ibmblade -o metadata > ibmblade/.fence_ibmblade.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng ibmblade/.fence_ibmblade.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl ibmblade/.fence_ibmblade.8.tmp > ibmblade/fence_ibmblade.8
ibmblade/.fence_ibmblade.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl ibmblade/.fence_ibmblade.8.tmp | grep -v '<?xml' > ibmblade/fence_ibmblade.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python bladecenter/fence_bladecenter -o metadata > bladecenter/.fence_bladecenter.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng bladecenter/.fence_bladecenter.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl bladecenter/.fence_bladecenter.8.tmp > bladecenter/fence_bladecenter.8
bladecenter/.fence_bladecenter.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl bladecenter/.fence_bladecenter.8.tmp | grep -v '<?xml' > bladecenter/fence_bladecenter.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python rhevm/fence_rhevm -o metadata > rhevm/.fence_rhevm.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng rhevm/.fence_rhevm.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl rhevm/.fence_rhevm.8.tmp > rhevm/fence_rhevm.8
rhevm/.fence_rhevm.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl rhevm/.fence_rhevm.8.tmp | grep -v '<?xml' > rhevm/fence_rhevm.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python ilo/fence_ilo -o metadata > ilo/.fence_ilo.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng ilo/.fence_ilo.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl ilo/.fence_ilo.8.tmp > ilo/fence_ilo.8
ilo/.fence_ilo.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl ilo/.fence_ilo.8.tmp | grep -v '<?xml' > ilo/fence_ilo.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python alom/fence_alom -o metadata > alom/.fence_alom.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng alom/.fence_alom.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl alom/.fence_alom.8.tmp > alom/fence_alom.8
alom/.fence_alom.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl alom/.fence_alom.8.tmp | grep -v '<?xml' > alom/fence_alom.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python azure_arm/fence_azure_arm -o metadata > azure_arm/.fence_azure_arm.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng azure_arm/.fence_azure_arm.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl azure_arm/.fence_azure_arm.8.tmp > azure_arm/fence_azure_arm.8
azure_arm/.fence_azure_arm.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl azure_arm/.fence_azure_arm.8.tmp | grep -v '<?xml' > azure_arm/fence_azure_arm.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python mpath/fence_mpath -o metadata > mpath/.fence_mpath.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng mpath/.fence_mpath.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl mpath/.fence_mpath.8.tmp > mpath/fence_mpath.8
mpath/.fence_mpath.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl mpath/.fence_mpath.8.tmp | grep -v '<?xml' > mpath/fence_mpath.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python amt/fence_amt -o metadata > amt/.fence_amt.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng amt/.fence_amt.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl amt/.fence_amt.8.tmp > amt/fence_amt.8
amt/.fence_amt.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl amt/.fence_amt.8.tmp | grep -v '<?xml' > amt/fence_amt.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python ilo_moonshot/fence_ilo_moonshot -o metadata > ilo_moonshot/.fence_ilo_moonshot.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng ilo_moonshot/.fence_ilo_moonshot.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl ilo_moonshot/.fence_ilo_moonshot.8.tmp > ilo_moonshot/fence_ilo_moonshot.8
ilo_moonshot/.fence_ilo_moonshot.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl ilo_moonshot/.fence_ilo_moonshot.8.tmp | grep -v '<?xml' > ilo_moonshot/fence_ilo_moonshot.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python apc/fence_apc -o metadata > apc/.fence_apc.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng apc/.fence_apc.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl apc/.fence_apc.8.tmp > apc/fence_apc.8
apc/.fence_apc.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl apc/.fence_apc.8.tmp | grep -v '<?xml' > apc/fence_apc.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python vmware_soap/fence_vmware_soap -o metadata > vmware_soap/.fence_vmware_soap.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng vmware_soap/.fence_vmware_soap.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl vmware_soap/.fence_vmware_soap.8.tmp > vmware_soap/fence_vmware_soap.8
vmware_soap/.fence_vmware_soap.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl vmware_soap/.fence_vmware_soap.8.tmp | grep -v '<?xml' > vmware_soap/fence_vmware_soap.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python sanbox2/fence_sanbox2 -o metadata > sanbox2/.fence_sanbox2.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng sanbox2/.fence_sanbox2.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl sanbox2/.fence_sanbox2.8.tmp > sanbox2/fence_sanbox2.8
sanbox2/.fence_sanbox2.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl sanbox2/.fence_sanbox2.8.tmp | grep -v '<?xml' > sanbox2/fence_sanbox2.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python zvm/fence_zvmip -o metadata > zvm/.fence_zvmip.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng zvm/.fence_zvmip.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl zvm/.fence_zvmip.8.tmp > zvm/fence_zvmip.8
zvm/.fence_zvmip.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl zvm/.fence_zvmip.8.tmp | grep -v '<?xml' > zvm/fence_zvmip.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python ilo_ssh/fence_ilo_ssh -o metadata > ilo_ssh/.fence_ilo_ssh.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng ilo_ssh/.fence_ilo_ssh.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl ilo_ssh/.fence_ilo_ssh.8.tmp > ilo_ssh/fence_ilo_ssh.8
ilo_ssh/.fence_ilo_ssh.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl ilo_ssh/.fence_ilo_ssh.8.tmp | grep -v '<?xml' > ilo_ssh/fence_ilo_ssh.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python docker/fence_docker -o metadata > docker/.fence_docker.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng docker/.fence_docker.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl docker/.fence_docker.8.tmp > docker/fence_docker.8
docker/.fence_docker.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl docker/.fence_docker.8.tmp | grep -v '<?xml' > docker/fence_docker.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python drac/fence_drac -o metadata > drac/.fence_drac.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng drac/.fence_drac.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl drac/.fence_drac.8.tmp > drac/fence_drac.8
drac/.fence_drac.8.tmp validates
xsltproc ../../fence/agents/lib/fence2wiki.xsl drac/.fence_drac.8.tmp | grep -v '<?xml' > drac/fence_drac.wiki
set -e && \
PYTHONPATH=/<<PKGBUILDDIR>>/fence/agents/lib:/<<PKGBUILDDIR>>/fence/agents/../lib:/<<PKGBUILDDIR>>/fence/agents/lib \
	/usr/bin/python amt_ws/fence_amt_ws -o metadata > amt_ws/.fence_amt_ws.8.tmp && \
xmllint --noout --relaxng /<<PKGBUILDDIR>>/fence/agents/lib/metadata.rng amt_ws/.fence_amt_ws.8.tmp && \
xsltproc ../../fence/agents/lib/fence2man.xsl amt_ws/.fence_amt_ws.8.tmp > amt_ws/fence_amt_ws.8
Traceback (most recent call last):
  File "amt_ws/fence_amt_ws", line 27, in <module>
    import pywsman
ImportError: No module named pywsman
Makefile:1133: recipe for target 'amt_ws/fence_amt_ws.8' failed
make[4]: *** [amt_ws/fence_amt_ws.8] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/fence/agents'
Makefile:389: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/fence'
Makefile:451: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
Makefile:383: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: make -j1 returned exit code 2
debian/rules:11: recipe for target 'build-arch' failed
make: *** [build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2
--------------------------------------------------------------------------------

The problem is in configure.ac, where AGENTS_LIST is defined as the
output of a "find" command and later fence_amt_ws.py is removed from
the list in this way:

AGENTS_LIST=$(echo $AGENTS_LIST | sed -e "s!amt_ws/fence_amt_ws.py !!")

This fails when fence_amt_ws.py is the last element in the list,
because the "sed" commands expect a space after it.

The package failed for me 100% of the time in some of my autobuilders,
but it may be easily reproduced on any machine by applying this patch:

--- a/configure.ac
+++ b/configure.ac
@@ -142,6 +142,10 @@ if test "x$AGENTS_LIST" = xall; then
 	AGENTS_LIST=`find $srcdir/fence/agents -mindepth 2 -maxdepth 2 -name '*.py' -printf '%P ' | sed -e 's#lib/[A-Za-z_.]* ##g' -e 's#nss_wrapper/[A-Za-z_.]* ##g' -e 's#autodetect/[A-Za-z_.]* ##g'`
 fi
 
+# Put fence_amt_ws.py at the end of the list
+AGENTS_LIST=`echo $AGENTS_LIST | sed -e 's at amt_ws/fence_amt_ws.py@@'`
+AGENTS_LIST="$AGENTS_LIST amt_ws/fence_amt_ws.py"
+
 # remove fence_amt_ws because we don't have openwsman (and sblim-sfcc) in Debian
 AGENTS_LIST=$(echo $AGENTS_LIST | sed -e "s!amt_ws/fence_amt_ws.py !!")
 

The trivial fix is to remove the space in the sed command, like this:

AGENTS_LIST=$(echo $AGENTS_LIST | sed -e "s!amt_ws/fence_amt_ws.py!!")

but maybe it would be a little bit nicer to exclude the problematic
file right in the find command, as in the patch below, to be applied on
top of "debian/patches/remove-fence_amt_ws".

Note: I'm still doing QA on stretch and buster, since they are still
supported distributions, so I'd like to see the package fixed in
stretch and buster as well. Please tell me if you need/welcome help
for that. For example, I could prepare an upload for proposed-updates,
or submit a bug against release.debian.org for acceptance, or both.
(After the package is fixed in unstable, I mean).

Thanks.

--- a/configure.ac
+++ b/configure.ac
@@ -138,13 +138,11 @@ if test "x$AGENTS_LIST" != xall; then
 	done
 fi
 
+# remove fence_amt_ws because we don't have openwsman (and sblim-sfcc) in Debian
 if test "x$AGENTS_LIST" = xall; then
-	AGENTS_LIST=`find $srcdir/fence/agents -mindepth 2 -maxdepth 2 -name '*.py' -printf '%P ' | sed -e 's#lib/[A-Za-z_.]* ##g' -e 's#nss_wrapper/[A-Za-z_.]* ##g' -e 's#autodetect/[A-Za-z_.]* ##g'`
+	AGENTS_LIST=`find $srcdir/fence/agents -mindepth 2 -maxdepth 2 -name '*.py' ! -name 'fence_amt_ws.py' -printf '%P ' | sed -e 's#lib/[A-Za-z_.]* ##g' -e 's#nss_wrapper/[A-Za-z_.]* ##g' -e 's#autodetect/[A-Za-z_.]* ##g'`
 fi
 
-# remove fence_amt_ws because we don't have openwsman (and sblim-sfcc) in Debian
-AGENTS_LIST=$(echo $AGENTS_LIST | sed -e "s!amt_ws/fence_amt_ws.py !!")
-
 XENAPILIB=0
 if echo "$AGENTS_LIST" | grep -q xenapi; then
 	XENAPILIB=1



More information about the Debian-ha-maintainers mailing list