1
Description: Ensures that commands are always executed.
2
Do not check current node state when executing an ipmi
3
command, which ensures that nodes are always turned on/off
4
regardless of their power state. This fixes corner cases
5
found when running automated tests.
6
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1171418
8
--- maas-1.2+bzr1373+dfsg.orig/src/provisioningserver/power/templates/ipmi.template 2013-03-20 13:59:10.000000000 -0400
9
+++ maas-1.2+bzr1373+dfsg/src/provisioningserver/power/templates/ipmi.template 2013-08-12 13:36:17.241183232 -0400
12
if [ -n "$power_driver" ]
14
- driver_option="--driver-type=$power_driver"
15
+ driver_option="--driver-type=${power_driver}"
20
${ipmipower} ${driver_option} -h ${power_address} -u ${power_user} -p ${power_pass} "$@"
24
-# Get the given system's power state: 'on' or 'off'.
26
- ipmi_state=$(issue_ipmi_command stat)
27
- formulate_power_state ${ipmi_state}
31
-if [ "$(get_power_state)" != "${power_change}" ]
33
- power_command=$(formulate_power_command ${power_change})
34
- issue_ipmi_command ${power_command}
36
+# This script deliberately does not check the current power state
37
+# before issuing the requested power command. See bug 1171418 for an
39
+power_command=$(formulate_power_command ${power_change})
40
+issue_ipmi_command ${power_command}