Manage firmware settings for a baremetal node using ironic

Registered by Shivanand Tendulker

It is possible to fine tune the server for the deployment needs, processor performance and power optimization by changing the firmware settings of the baremetal node.

Currently Ironic do not provide any mechanism to retrive and update the firmware settings. These firmware settings could be broadly classified as:-
1. Boot settings. Some examples:-
 a. Supported boot mode
 b. Boot mode
 b. Next boot moode
 c. Boot Device
 d. iSCSI boot configurations

2. Network Settings. Some examples:-
 a. NIC settings
 b. Changing boot preference. PXE, iSCSI etc.

3. Processor Settings. Some examples:-
 a. Enabling fixed number of cores
 b. Processor performace settings
 c. Enabling processor level virtualization technologies

4. Power settings. Some examples:-
  a. Power saving modes
 b. Power management options

5. Other Vendor specific settings. Some examples:-
 a. Remote access/Enclosure IP address
 b. HP Smart array configuration
 c. One time boot
 d. Run diagnostic on next boot

Apart from vendor specific firmware settings, most of the boot, network, processor and power settings are applicable to most of the hardware vendors. It would be useful if these firmware settings are made available through standard interface through base.ManagementInterface.

The base.ManagementInterface class currently exposes few of the firmware settings already. These are:-
get_supported_boot_devices() -- Get a list of the supported boot devices.
set_boot_device() -- Set the boot device for a node.
get_boot_device() -- Get the current boot device for a node.

We propose to add following additional interfaces to this class to get individual firmware setting which are standard in nature:-
1. get_supported_boot_modes(self, task) -- Get the boot modes supported. Ex. { BIOS, UEFI }

2. get_current_boot_mode(self, task) -- Get the current boot mode. Ex. BIOS

3. get_pending_boot_mode(self, task) -- Get pending boot mode, which becomes active on next server reboot.
4. set_pending_boot_mode(self, task,**kwargs) -- Set boot mode this will becomes active on next server reboot.

5. get_one_time_boot_mode(self, task) -- Get one time boot setting for the server
6. set_one_time_boot_mode(self, task,**kwargs) -- Set one time boot setting for the server, which would be active one next server reboot

7. get_nic_boot_mode(self, task) -- Get the network boot mode configured for each of NIC(s) on the node. A NIC could be configured for PXE or iSCSI boot.
8. set_nic_boot_mode(self, task,**kwargs) -- Set the network boot mode for given NIC(s).

9. get_boot_order(self, task) -- Get the boot order of devices. Ex: CDROM, HDD, FLOPPY, USB, NETWORK
10. set_boot_order(self, task,**kwargs) -- Set the boot order of devices

Also it would be helpful if we add one pair of interface to retrieve and update the vendor specific firmware settings. We propose following set of APIs to retrive/update such settings.
11. get_firmware_settings(self, task) -- Get the list of firmware setting as dictionary
12. set_firmware_settings(self, task,**kwargs) -- Sets the firmware setting provided as dictionary

It would be useful if the all the vendors support single nomenclature for names of the standard firmware settings like "supported_boot_devices", "current_boot_order", "current_boot_mode" etc. This would help end-user, if he were to use the different drivers and retrieve the firmware settings. He could use these standard names to interpret standard settings.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Shivanand Tendulker
Direction:
Needs approval
Assignee:
Shivanand Tendulker
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:firmware-settings,n,z

Addressed by: https://review.openstack.org/101122
    Design spec for firmware settings feature.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.