Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Hi, I have uploaded xen-api/1.3.2-13, which corrects 2 things: the hostname change script was designed by CentOS, so I've fixed that, and also, the init script was hanging waiting forever if the xen-api host was a slave node, so I added a test in the init script, thanks to a patch from the bug reporter (who helped a lot fixing lots of issues). Please unblock xen-api/1.3.2-13. Cheers, Thomas Goirand (zigo) P.S: I still hope that upstream will fix #678723, which is the most annoying remaining bug in this package. Appart from this remaining one, I don't think more bugfix in this package will be needed before Wheezy. XCP is otherwise perfectly functional, IMO.
diff -Nru xen-api-1.3.2/debian/changelog xen-api-1.3.2/debian/changelog --- xen-api-1.3.2/debian/changelog 2012-10-24 04:37:13.000000000 +0000 +++ xen-api-1.3.2/debian/changelog 2012-11-04 07:11:22.000000000 +0000 @@ -1,3 +1,13 @@ +xen-api (1.3.2-13) unstable; urgency=low + + * Fixes: wait_for_xapi() function in init.d script doesn't work on slave + hosts (Closes: #681343), thanks to George Shuklin <george.shuk...@gmail.com> + for the report and patch. + * Fixes: scripts/set-hostname was designed for CentOS, this has been patched + to fix this (Closes: #688961). + + -- Thomas Goirand <z...@debian.org> Sat, 03 Nov 2012 19:12:36 +0000 + xen-api (1.3.2-12) unstable; urgency=low * Fixes bashism in install-debian-pv.sh (Closes: #690612). diff -Nru xen-api-1.3.2/debian/patches/fixes-set-hostname-was-designed-for-centos.patch xen-api-1.3.2/debian/patches/fixes-set-hostname-was-designed-for-centos.patch --- xen-api-1.3.2/debian/patches/fixes-set-hostname-was-designed-for-centos.patch 1970-01-01 00:00:00.000000000 +0000 +++ xen-api-1.3.2/debian/patches/fixes-set-hostname-was-designed-for-centos.patch 2012-11-04 07:11:22.000000000 +0000 @@ -0,0 +1,26 @@ +Description: Fixes scripts/set-hostname for Debian + scripts/set-hostname was designed for CentOS, modifying /etc/sysconfig/network. + This patch fixes that and makes it work everywhere. +Author: Thomas Goirand <z...@debian.org> +Forwarded: no + +--- xen-api-1.3.2.orig/scripts/set-hostname ++++ xen-api-1.3.2/scripts/set-hostname +@@ -10,9 +10,13 @@ fi + HOSTNAME=$1 + + # Update system configuration +-sed -i -e "s/^\(HOSTNAME=\).*$/\1$1/g" /etc/sysconfig/network +- +-# Set current hostname +-hostname "$HOSTNAME" ++if [ -f /etc/debian_version ] ; then ++ echo $1 >/etc/hostname ++ invoke-rc.d hostname.sh start ++else ++ sed -i -e "s/^\(HOSTNAME=\).*$/\1$1/g" /etc/sysconfig/network ++ # Set current hostname ++ hostname "$HOSTNAME" ++fi + + exit 0 diff -Nru xen-api-1.3.2/debian/patches/series xen-api-1.3.2/debian/patches/series --- xen-api-1.3.2/debian/patches/series 2012-10-24 04:37:13.000000000 +0000 +++ xen-api-1.3.2/debian/patches/series 2012-11-04 07:11:22.000000000 +0000 @@ -40,3 +40,4 @@ pam-auth-root-xapi-group Fixes-bashism-in-ocaml-rt-install-debian-pv.sh.patch Fixes-bashism-in-interface-visualise.patch +fixes-set-hostname-was-designed-for-centos.patch diff -Nru xen-api-1.3.2/debian/xcp-xapi.init xen-api-1.3.2/debian/xcp-xapi.init --- xen-api-1.3.2/debian/xcp-xapi.init 2012-10-24 04:37:13.000000000 +0000 +++ xen-api-1.3.2/debian/xcp-xapi.init 2012-11-04 07:11:22.000000000 +0000 @@ -104,16 +104,18 @@ # on this one. As a last resort, sleep for some time. wait_for_xapi - # Do some standard setup, e.g. pif-scan, template creation (maybe) - . /etc/xcp/inventory - xe pif-scan host-uuid=${INSTALLATION_UUID} + # Do some standard setup, e.g. pif-scan, template creation (maybe), only if host is master + if grep -q master /etc/xcp/pool.conf ; then + . /etc/xcp/inventory + xe pif-scan host-uuid=${INSTALLATION_UUID} - # Check whether the md5 of the create-templates binary matches the one - # used previously. If not, recreate the templates. - if [ -e /usr/lib/xcp/lib/create_templates ]; then - if ! md5sum -c --status $TEMPLATES_MD5_STAMP ; then - /usr/lib/xcp/lib/regenerate-templates start - md5sum /usr/lib/xcp/lib/create_templates > $TEMPLATES_MD5_STAMP + # Check whether the md5 of the create-templates binary matches the one + # used previously. If not, recreate the templates. + if [ -e /usr/lib/xcp/lib/create_templates ]; then + if ! md5sum -c --status $TEMPLATES_MD5_STAMP ; then + /usr/lib/xcp/lib/regenerate-templates start + md5sum /usr/lib/xcp/lib/create_templates > $TEMPLATES_MD5_STAMP + fi fi fi }