Bases: object
Mixin with deploy methods.
Helper method to configure local boot on the node.
This method triggers bootloader installation on the node. On successful installation of bootloader, this method sets the node to boot from disk.
Parameters: |
|
---|---|
Raises: | InstanceDeployFailure if bootloader installation failed or on encountering error while setting the boot device on the node. |
Start the next cleaning step if the previous one is complete.
In order to avoid errors and make agent upgrades painless, the agent compares the version of all hardware managers at the start of the cleaning (the agent’s get_clean_steps() call) and before executing each clean step. If the version has changed between steps, the agent is unable to tell if an ordering change will cause a cleaning issue so it returns CLEAN_VERSION_MISMATCH. For automated cleaning, we restart the entire cleaning cycle. For manual cleaning, we don’t.
Additionally, if a clean_step includes the reboot_requested property set to True, this method will coordinate the reboot once the step is completed.
Continues the deployment of baremetal node.
This method continues the deployment of the baremetal node after the ramdisk have been booted.
Parameters: | task – a TaskManager instance |
---|
Check if the deployment has started already.
Returns: | True if the deploy has started, False otherwise. |
---|
Check if the deployment is already completed.
Returns: | True if the deployment is completed. False otherwise |
---|
Process a heartbeat.
Parameters: |
|
---|
Prepares instance to boot.
Parameters: |
|
---|---|
Raises: | InvalidState if fails to prepare instance |
Helper method to trigger reboot on the node and finish deploy.
This method initiates a reboot on the node. On success, it marks the deploy as complete. On failure, it logs the error and marks deploy as failure.
Parameters: | task – a TaskManager object containing the node |
---|---|
Raises: | InstanceDeployFailure, if node reboot failed. |
Bases: ironic.drivers.modules.agent_base_vendor.AgentDeployMixin, ironic.drivers.base.VendorInterface
Validate the driver deployment info.
Parameters: | method – method to be validated. |
---|
Return the properties of the interface.
Returns: | dictionary of <property name>:<property description> entries. |
---|
Method for agent to periodically check in.
The agent should be sending its agent_url (so Ironic can talk back) as a kwarg. kwargs should have the following format:
{
'agent_url': 'http://AGENT_HOST:AGENT_PORT'
}
AGENT_PORT defaults to 9999.
Find a matching node for the agent.
Method to be called the first time a ramdisk agent checks in. This can be because this is a node just entering decom or a node that rebooted for some reason. We will use the mac addresses listed in the kwargs to find the matching node, then return the node object to the agent. The agent can that use that UUID to use the node vendor passthru method.
Currently, we don’t handle the instance where the agent doesn’t have a matching node (i.e. a brand new, never been in Ironic node).
Additionally, we may pass on useful configurations to the agent, which it would then be responsible for applying if relevant. Today these are limited to heartbeat_timeout and metrics configuration.
kwargs should have the following format:
{
"version": "2"
"inventory": {
"interfaces": [
{
"name": "eth0",
"mac_address": "00:11:22:33:44:55",
"switch_port_descr": "port24",
"switch_chassis_descr": "tor1"
}, ...
], ...
},
"node_uuid": "ab229209-0139-4588-bbe5-64ccec81dd6e"
}
The interfaces list should include a list of the non-IPMI MAC addresses in the form aa:bb:cc:dd:ee:ff.
node_uuid argument is optional. If it’s provided (e.g. as a result of inspection run before lookup), this method will just return a node and options.
This method will also return the timeout for heartbeats. The driver will expect the agent to heartbeat before that timeout, or it will be considered down. This will be in a root level key called ‘heartbeat_timeout’
Raises: | NotFound if no matching node is found. |
---|---|
Raises: | InvalidParameterValue with unknown payload version |