CCI-MOC / esi

Elastic Secure Infrastructure project
6 stars 12 forks source link

Investigate Ironic BIOS settings #178

Closed tzumainn closed 2 years ago

tzumainn commented 2 years ago

We want to prevent lessees from making permanent changes to BIOS settings. Ironic has a way to set bios parameters such that they are re-applied during cleaning. We should test this out.

tzumainn commented 2 years ago

https://docs.openstack.org/ironic/latest/admin/bios.html

DanNiESh commented 2 years ago

@larsks I'm using dell-3 node. ipmi address: 10.1.10.3. The doc describes how to set the idrac driver info. I'm trying to use WSMAN for all interfaces. And thus I need the drac_user (usually root user), drac_password, and drac_address for dell-3. Or alternatively, Redfish could be used for all interfaces. And Redfish user/password, address should be provided.

larsks commented 2 years ago

@DanNiESh can you tell me more about how things are failing? Grabbing the python-dracclient package, which is what Ironic's iDRAC driver is using, I can authenticate using the hil username and password and all the operations I've tried seem to succeed:

>>> import os
>>> import dracclient.client
>>> client = dracclient.client.DRACClient('10.1.10.3', os.environ['IDRAC_USERNAME'], os.environ['IDRAC_PASSWORD'])
>>> client.get_system()
System(id='System.Embedded.2', lcc_version='2.70.70.70', model='PowerEdge M620', service_tag='J4DVM02', uuid='4c4c4544-0034-4410-8056-cac04f4d3032', last_system_inventory_time='20220108021625')
>>> client.set_power_state('POWER_OFF')
>>>

Etc.

It looks like RedFish is already enabled on this system as well.

DanNiESh commented 2 years ago

@DanNiESh can you tell me more about how things are failing? Grabbing the python-dracclient package, which is what Ironic's iDRAC driver is using, I can authenticate using the hil username and password and all the operations I've tried seem to succeed:

>>> import os
>>> import dracclient.client
>>> client = dracclient.client.DRACClient('10.1.10.3', os.environ['IDRAC_USERNAME'], os.environ['IDRAC_PASSWORD'])
>>> client.get_system()
System(id='System.Embedded.2', lcc_version='2.70.70.70', model='PowerEdge M620', service_tag='J4DVM02', uuid='4c4c4544-0034-4410-8056-cac04f4d3032', last_system_inventory_time='20220108021625')
>>> client.set_power_state('POWER_OFF')
>>>

Etc.

It looks like RedFish is already enabled on this system as well.

I ran the command "openstack baremetal node power on dell-3" and after that, the node was set to maintenance mode. The error was: Failed to change power state to 'power on'. Error: DRAC operation failed. Reason: Invalid response received. Status code: "401", reason: "Unauthorized"

tzumainn commented 2 years ago

https://github.com/CCI-MOC/esi/pull/186