Cannot handle 'unsupported' case

Bug #1698981 reported by Yushiro FURUKAWA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-scciclient
New
Undecided
Unassigned

Bug Description

Current python-scciclient, it occurs AttributeError when a target of baremetal server is out of support(e.g. iRMC s2) In this case, following case were stored into ir-cond.log:

[power ON/OFF]
2017-06-15 20:57:17.730 DEBUG ironic.common.utils [req-3753b019-1442-4ed0-a045-a8130a0f9cdc None None] Command stderr is: "Get HPM.x Capabilities request failed, compcode = d4
" from (pid=22181) execute /opt/stack/ironic/ironic/common/utils.py:78
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:843: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verifi
cation is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CMDSEQ>
  <CMD Context="SCCI" OC="PowerOffCabinet" OE="0" OI="0" Type="SET">
  </CMD>
</CMDSEQ>

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Status>
  <Error Context="SCCI" OC="0" OE="0" OI="0">XML parsing failed.</Error>
</Status>
async = True
2017-06-15 20:57:25.226 ERROR ironic.conductor.manager [req-3753b019-1442-4ed0-a045-a8130a0f9cdc None None] Error in tear_down of node af149987-f0a0-485f-afb6-993726a80fe7: 'Non
eType' object has no attribute 'text'
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager Traceback (most recent call last):
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/conductor/manager.py", line 655, in _do_node_tear_down
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager task.driver.deploy.tear_down(task)
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/usr/local/lib/python2.7/dist-packages/ironic_lib/metrics.py", line 61, in wrapped
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager result = f(*args, **kwargs)
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/conductor/task_manager.py", line 146, in wrapper
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager return f(*args, **kwargs)
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/drivers/modules/iscsi_deploy.py", line 470, in tear_down
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager manager_utils.node_power_action(task, states.POWER_OFF)
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/conductor/task_manager.py", line 146, in wrapper
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager return f(*args, **kwargs)
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/conductor/utils.py", line 193, in node_power_action
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager fields.NotificationStatus.ERROR, new_state)
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager self.force_reraise()
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager six.reraise(self.type_, self.value, self.tb)
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/conductor/utils.py", line 162, in node_power_action
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager timeout=timeout)
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/usr/local/lib/python2.7/dist-packages/ironic_lib/metrics.py", line 61, in wrapped
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager result = f(*args, **kwargs)
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/conductor/task_manager.py", line 146, in wrapper
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager return f(*args, **kwargs)
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/drivers/modules/irmc/power.py", line 264, in set_power_state
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager _set_power_state(task, power_state, timeout=timeout)
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/drivers/modules/irmc/power.py", line 177, in _set_power_state
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager irmc_client(STATES_MAP[target_state])
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager File "/usr/local/lib/python2.7/dist-packages/scciclient/irmc/scci.py", line 288, in scci_cmd
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager if not int(status.text) == 0:
2017-06-15 20:57:25.226 TRACE ironic.conductor.manager AttributeError: 'NoneType' object has no attribute 'text'

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers