-
Notifications
You must be signed in to change notification settings - Fork 6
Description
When Power-cycle an M8 blade for it to boot to PXE (via API), it keeps booting to HD and not to PXE.
But when doing the same manually, it is booting to PXE (therefore no network connection issue with our PXE server or a PXE server issue).
The code we are using wasn’t changed for years now and was working fine. I’m not sure if the issue we seen now is specific to M8 blades or a global issue as I’m not sure if we recently installed a UCSX blade other than M8.
The relevant code is this:
filter1 = "Name eq '" + host_location + "'"
blade_setting_mo = call_ucsx.compute_api_instance.get_compute_server_setting_list(filter=filter1)
if blade_setting_mo is not None and len(blade_setting_mo.results) > 0:
blade_setting_moid = blade_setting_mo.results[0].moid
call_ucsx.compute_server_setting.admin_power_state = "PowerCycle"
call_ucsx.compute_server_setting.one_time_boot_device = "pxe"
update_response = call_ucsx.compute_api_instance.update_compute_server_setting(blade_setting_moid, call_ucsx.compute_server_setting)
for i in update_response.server_op_status:
if 'ServerPowerCycle' in i.workflow_type:
return True
When testing it manually, I do get confirmation about the power-cycle, see here:
In [14]: update_response.server_op_status
Out[14]:
[{'WorkflowInfoMoid': '68b84ef0696f6e3301027f61',
'class_id': 'compute.ServerOpStatus',
'config_state': 'Scheduled',
'object_type': 'compute.ServerOpStatus',
'workflow_type': 'compute.ServerPowerCycle'},
{'WorkflowInfoMoid': '686a1bfb696f6e3301de7b24',
'class_id': 'compute.ServerOpStatus',
'config_state': 'Applied',
'object_type': 'compute.ServerOpStatus',
'workflow_type': 'compute.ServerHardReset'},
{'WorkflowInfoMoid': '686b9b7c696f6e33010605f2',
'class_id': 'compute.ServerOpStatus',
'config_state': 'Applied',
'object_type': 'compute.ServerOpStatus',
'workflow_type': 'compute.ServerPowerOff'},
{'WorkflowInfoMoid': '686baa1e696f6e3301087093',
'class_id': 'compute.ServerOpStatus',
'config_state': 'Failed',
'object_type': 'compute.ServerOpStatus',
'workflow_type': 'compute.ServerPowerOn'}]