diff -Nru maas-0.1+bzr1243+dfsg/debian/changelog maas-0.1+bzr1243+dfsg/debian/changelog --- maas-0.1+bzr1243+dfsg/debian/changelog 2012-10-10 05:01:14.000000000 +0000 +++ maas-0.1+bzr1243+dfsg/debian/changelog 2012-10-10 13:32:32.000000000 +0000 @@ -1,3 +1,12 @@ +maas (0.1+bzr1243+dfsg-0ubuntu3) quantal; urgency=low + + * 04-fix-ipmi-enlistment.patch: retry maas-enlist without power parameters + on failure. This allows enlistment to continue working with Precise + ephemeral images before the Precise SRU for maas-enlist lands. + (LP: #1064922). + + -- Robie Basak Wed, 10 Oct 2012 13:29:16 +0000 + maas (0.1+bzr1243+dfsg-0ubuntu2) quantal; urgency=low * debian/patches/99-ipmi-user-too-long.patch: Fix username too long for diff -Nru maas-0.1+bzr1243+dfsg/debian/patches/04-fix-ipmi-enlistment.patch maas-0.1+bzr1243+dfsg/debian/patches/04-fix-ipmi-enlistment.patch --- maas-0.1+bzr1243+dfsg/debian/patches/04-fix-ipmi-enlistment.patch 1970-01-01 00:00:00.000000000 +0000 +++ maas-0.1+bzr1243+dfsg/debian/patches/04-fix-ipmi-enlistment.patch 2012-10-10 13:29:12.000000000 +0000 @@ -0,0 +1,23 @@ +Description: Retry maas-enlist without power parameters on failure + Older versions of maas-enlist (such as in Precise) do not support the + new power parameters switches and fail when they are provided, so on + failure retry without them. +Forwarded: https://code.launchpad.net/~racb/maas/fix-ipmi-enlistment/+merge/128914 +Author: Robie Basak +Bug-Ubuntu: https://launchpad.net/bugs/1064922 +Last-Update: 20121010 + +--- a/contrib/preseeds_v2/enlist_userdata ++++ b/contrib/preseeds_v2/enlist_userdata +@@ -182,7 +182,10 @@ + fi + power_params=$(maas-ipmi-autodetect --configdir "$IPMI_CONFIG_D" ${pargs} --commission-creds) && + [ -n "${power_params}" ] && power_params=${power_params%.} && power_type=ipmi +- maas-enlist --serverurl "$url" ${host:+--hostname "${host}"} ${power_params:+--power-params "${power_params}" --power-type "${power_type}"}>/tmp/enlist.out ++ # Try maas-enlist without power parameters on failure for older versions of ++ # maas-enlist without power parameter support ++ maas-enlist --serverurl "$url" ${host:+--hostname "${host}"} ${power_params:+--power-params "${power_params}" --power-type "${power_type}"}>/tmp/enlist.out ||\ ++ maas-enlist --serverurl "$url" ${host:+--hostname "${host}"} >/tmp/enlist.out + if [ $? -eq 0 ]; then + msg="successfully enlisted to '$url'" + [ -n "$host" ] && msg="$msg with hostname '$host'" || diff -Nru maas-0.1+bzr1243+dfsg/debian/patches/series maas-0.1+bzr1243+dfsg/debian/patches/series --- maas-0.1+bzr1243+dfsg/debian/patches/series 2012-10-10 04:57:51.000000000 +0000 +++ maas-0.1+bzr1243+dfsg/debian/patches/series 2012-10-10 13:23:47.000000000 +0000 @@ -2,3 +2,4 @@ 02-pserv-config.patch 03-txlongpoll-config.patch 99-ipmi-user-too-long.patch +04-fix-ipmi-enlistment.patch