Check multiple SM15k nodes in MAAS, using the drop-down select "Start selected nodes". Some nodes will succeed, others will fail with PowerActionFail.
Error Output:
[2014-04-04 20:41:35,135: ERROR/Worker-8] power_on: sm15k failed: Command '# -*- mode: shell-script -*-
#
# Control a system via ipmipower, sending the seamicro specific hex codes
#
# Control power using IPMI
issue_ipmi_command() {
${ipmitool} -I lanplus \
-H ${power_address} -U ${power_user}\
-P ${power_pass} raw 0x2E 1 0x00 0x7d 0xab \ ${power_mode} 0 ${system_id}
}
# Control power using REST v0.9
issue_rest_v09_command() {
python - << END
from provisioningserver.custom_hardware.seamicro import power_control_seamicro15k_v09
power_control_seamicro15k_v09("${power_address}", "${power_user}", "${power_pass}", "${system_id}", "${power_change}")
END
}
# Control power using REST v2
issue_rest_v2_command() {
python - << END
from provisioningserver.custom_hardware.seamicro import power_control_seamicro15k_v2
power_control_seamicro15k_v2("${power_address}", "${power_user}", "${power_pass}", "${system_id}", "${power_change}")
END
}
if [ "${power_control}" = "ipmi" ]
then
issue_ipmi_command
elif [ "${power_control}" = "restapi" ]
then
issue_rest_v09_command
elif [ "${power_control}" = "restapi2" ]
then
issue_rest_v2_command
fi
' returned non-zero exit status 1:
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/usr/lib/python2.7/dist-packages/provisioningserver/custom_hardware/seamicro.py", line 331, in power_control_seamicro15k_v2
server.power_on()
File "/usr/lib/python2.7/dist-packages/seamicroclient/v2/servers.py", line 28, in power_on
self.manager.power_on(self, using_pxe)
File "/usr/lib/python2.7/dist-packages/seamicroclient/v2/servers.py", line 114, in power_on
self._action('power-on', server, action_params)
File "/usr/lib/python2.7/dist-packages/seamicroclient/v2/servers.py", line 219, in _action
return self.api.client.put(url, body=body)
File "/usr/lib/python2.7/dist-packages/seamicroclient/client.py", line 194, in put
return self._cs_request(url, 'PUT', **kwargs)
File "/usr/lib/python2.7/dist-packages/seamicroclient/client.py", line 185, in _cs_request
raise e
seamicroclient.exceptions.Unauthorized: Failure: SESSION_INVALID (HTTP 401)
[2014-04-04 20:41:35,138: ERROR/MainProcess] Task provisioningserver.tasks.power_on[de917f8f-2d54-4efd-b541-bdc5fc81acfc] raised unexpected: PowerActionFail()
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/celery/app/trace.py", line 218, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/celery/app/trace.py", line 398, in __protected_call__
return self.run(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/provisioningserver/tasks.py", line 93, in wrapper
func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/provisioningserver/tasks.py", line 179, in power_on
issue_power_action(power_type, 'on', **kwargs)
File "/usr/lib/python2.7/dist-packages/provisioningserver/tasks.py", line 164, in issue_power_action
pa.execute(**kwargs)
File "/usr/lib/python2.7/dist-packages/provisioningserver/power/poweraction.py", line 133, in execute
self.run_shell(rendered)
File "/usr/lib/python2.7/dist-packages/provisioningserver/power/poweraction.py", line 121, in run_shell
raise PowerActionFail(self, e)
PowerActionFail
How to Reproduce:
Check multiple SM15k nodes in MAAS, using the drop-down select "Start selected nodes". Some nodes will succeed, others will fail with PowerActionFail.
Error Output:
[2014-04-04 20:41:35,135: ERROR/Worker-8] power_on: sm15k failed: Command '# -*- mode: shell-script -*-
#
# Control a system via ipmipower, sending the seamicro specific hex codes
#
# Parameters ***.*** .***.** * restapi2 /usr/bin/ ipmitool
power_change=on
power_address=
power_user=admin
power_pass=******
power_control=
system_id=48
ipmitool=
# IPMI power mode
power_mode=1
# Control power using IPMI command( ) {
${power_ mode} 0 ${system_id}
issue_ipmi_
${ipmitool} -I lanplus \
-H ${power_address} -U ${power_user}\
-P ${power_pass} raw 0x2E 1 0x00 0x7d 0xab \
}
# Control power using REST v0.9 v09_command( ) { ver.custom_ hardware. seamicro import power_control_ seamicro15k_ v09 seamicro15k_ v09("${ power_address} ", "${power_user}", "${power_pass}", "${system_id}", "${power_change}")
issue_rest_
python - << END
from provisioningser
power_control_
END
}
# Control power using REST v2 v2_command( ) { ver.custom_ hardware. seamicro import power_control_ seamicro15k_ v2 seamicro15k_ v2("${power_ address} ", "${power_user}", "${power_pass}", "${system_id}", "${power_change}")
issue_rest_
python - << END
from provisioningser
power_control_
END
}
if [ "${power_control}" = "ipmi" ] ipmi_command rest_v09_ command rest_v2_ command python2. 7/dist- packages/ provisioningser ver/custom_ hardware/ seamicro. py", line 331, in power_control_ seamicro15k_ v2 power_on( ) python2. 7/dist- packages/ seamicroclient/ v2/servers. py", line 28, in power_on manager. power_on( self, using_pxe) python2. 7/dist- packages/ seamicroclient/ v2/servers. py", line 114, in power_on _action( 'power- on', server, action_params) python2. 7/dist- packages/ seamicroclient/ v2/servers. py", line 219, in _action client. put(url, body=body) python2. 7/dist- packages/ seamicroclient/ client. py", line 194, in put request( url, 'PUT', **kwargs) python2. 7/dist- packages/ seamicroclient/ client. py", line 185, in _cs_request exceptions. Unauthorized: Failure: SESSION_INVALID (HTTP 401) ver.tasks. power_on[ de917f8f- 2d54-4efd- b541-bdc5fc81ac fc] raised unexpected: PowerActionFail() python2. 7/dist- packages/ celery/ app/trace. py", line 218, in trace_task python2. 7/dist- packages/ celery/ app/trace. py", line 398, in __protected_call__ python2. 7/dist- packages/ provisioningser ver/tasks. py", line 93, in wrapper python2. 7/dist- packages/ provisioningser ver/tasks. py", line 179, in power_on power_action( power_type, 'on', **kwargs) python2. 7/dist- packages/ provisioningser ver/tasks. py", line 164, in issue_power_action execute( **kwargs) python2. 7/dist- packages/ provisioningser ver/power/ poweraction. py", line 133, in execute run_shell( rendered) python2. 7/dist- packages/ provisioningser ver/power/ poweraction. py", line 121, in run_shell (self, e)
then
issue_
elif [ "${power_control}" = "restapi" ]
then
issue_
elif [ "${power_control}" = "restapi2" ]
then
issue_
fi
' returned non-zero exit status 1:
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/usr/lib/
server.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
return self.api.
File "/usr/lib/
return self._cs_
File "/usr/lib/
raise e
seamicroclient.
[2014-04-04 20:41:35,138: ERROR/MainProcess] Task provisioningser
Traceback (most recent call last):
File "/usr/lib/
R = retval = fun(*args, **kwargs)
File "/usr/lib/
return self.run(*args, **kwargs)
File "/usr/lib/
func(*args, **kwargs)
File "/usr/lib/
issue_
File "/usr/lib/
pa.
File "/usr/lib/
self.
File "/usr/lib/
raise PowerActionFail
PowerActionFail