launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #13237
[Merge] lp:~racb/maas/fix-ipmi-enlistment into lp:maas
Robie Basak has proposed merging lp:~racb/maas/fix-ipmi-enlistment into lp:maas.
Commit message:
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.
Requested reviews:
Andres Rodriguez (andreserl)
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1064922 in MAAS: "Enlistment fails"
https://bugs.launchpad.net/maas/+bug/1064922
For more details, see:
https://code.launchpad.net/~racb/maas/fix-ipmi-enlistment/+merge/128914
This fixes the problem for me. A better way would be to do some proper feature or version checking in maas-enlist, but this would introduce more chance of a regression and we are time constrained right now. This also spams the console, but at least it is clear when the fallback has taken place.
--
https://code.launchpad.net/~racb/maas/fix-ipmi-enlistment/+merge/128914
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~racb/maas/fix-ipmi-enlistment into lp:maas.
=== modified file 'contrib/preseeds_v2/enlist_userdata'
--- contrib/preseeds_v2/enlist_userdata 2012-10-10 04:46:36 +0000
+++ contrib/preseeds_v2/enlist_userdata 2012-10-10 11:44:24 +0000
@@ -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'" ||