The ironic.drivers.modules.irmc.deploy Module

iRMC Deploy Driver

class ironic.drivers.modules.irmc.deploy.IRMCVirtualMediaAgentDeploy[source]

Bases: ironic.drivers.base.DeployInterface

clean_up(task)[source]

Clean up the deployment environment for this node.

Ejects the attached virtual media from the iRMC and also removes the floppy image from the share file system, if it exists.

Parameters:task – a TaskManager instance.
deploy(*args, **kwargs)[source]

Perform a deployment to a node.

Prepares the options for the agent ramdisk and sets the node to boot from virtual media cdrom.

Parameters:task – a TaskManager instance.
Returns:states.DEPLOYWAIT
Raises:ImageCreationFailed, if it failed while creating the floppy image.
Raises:IRMCOperationError, if some operation on iRMC fails.
get_properties()[source]

Return the properties of the interface.

Returns:dictionary of <property name>:<property description> entries.
prepare(task)[source]

Prepare the deployment environment for this node.

Parameters:task – a TaskManager instance.
take_over(task)[source]

Take over management of this node from a dead conductor.

Parameters:task – a TaskManager instance.
tear_down(*args, **kwargs)[source]

Tear down a previous deployment on the task’s node.

Parameters:task – a TaskManager instance.
Returns:states.DELETED
validate(task)[source]

Validate the driver-specific Node deployment info.

Parameters:task – a TaskManager instance
Raises:IRMCSharedFileSystemNotMounted, if shared file system is not mounted.
Raises:InvalidParameterValue, if config option has invalid value.
Raises:MissingParameterValue if some parameters are missing.
class ironic.drivers.modules.irmc.deploy.IRMCVirtualMediaAgentVendorInterface[source]

Bases: ironic.drivers.modules.agent.AgentVendorInterface

Interface for vendor passthru related actions.

reboot_to_instance(task, **kwargs)[source]
class ironic.drivers.modules.irmc.deploy.IRMCVirtualMediaIscsiDeploy[source]

Bases: ironic.drivers.base.DeployInterface

Interface for iSCSI deploy-related actions.

clean_up(task)[source]

Clean up the deployment environment for the task’s node.

Unlinks instance image and triggers image cache cleanup.

Parameters:task – a TaskManager instance containing the node to act on.
deploy(*args, **kwargs)[source]

Start deployment of the task’s node.

Fetches the instance image, prepares the options for the deployment ramdisk, sets the node to boot from virtual media cdrom, and reboots the given node.

Parameters:task – a TaskManager instance containing the node to act on.
Returns:deploy state DEPLOYWAIT.
Raises:InstanceDeployFailure, if image size if greater than root partition.
Raises:ImageCreationFailed, if it failed while creating the floppy image.
Raises:IRMCOperationError, if some operation on iRMC fails.
get_properties()[source]
prepare(task)[source]

Prepare the deployment environment for the task’s node.

If preparation of the deployment environment ahead of time is possible, this method should be implemented by the driver.

If implemented, this method must be idempotent. It may be called multiple times for the same node on the same conductor, and it may be called by multiple conductors in parallel. Therefore, it must not require an exclusive lock.

This method is called before deploy.

Parameters:task – a TaskManager instance containing the node to act on.
take_over(task)[source]
tear_down(*args, **kwargs)[source]

Tear down a previous deployment on the task’s node.

Power off the node. All actual clean-up is done in the clean_up() method which should be called separately.

Parameters:task – a TaskManager instance containing the node to act on.
Returns:deploy state DELETED.
validate(task)[source]

Validate the deployment information for the task’s node.

Parameters:task – a TaskManager instance containing the node to act on.
Raises:InvalidParameterValue, if config option has invalid value.
Raises:IRMCSharedFileSystemNotMounted, if shared file system is not mounted.
Raises:InvalidParameterValue, if some information is invalid.
Raises:MissingParameterValue if ‘kernel_id’ and ‘ramdisk_id’ are missing in the Glance image, or if ‘kernel’ and ‘ramdisk’ are missing in the Non Glance image.
class ironic.drivers.modules.irmc.deploy.VendorPassthru[source]

Bases: ironic.drivers.modules.agent_base_vendor.BaseAgentVendor

Vendor-specific interfaces for iRMC deploy drivers.

continue_deploy(*args, **kwargs)[source]

Method invoked when deployed with the IPA ramdisk.

This method is invoked during a heartbeat from an agent when the node is in wait-call-back state. This deploys the image on the node and then configures the node to boot according to the desired boot option (netboot or localboot).

Parameters:
  • task – a TaskManager object containing the node.
  • kwargs – the kwargs passed from the heartbeat method.
Raises:

InstanceDeployFailure, if it encounters some error during the deploy.

get_properties()[source]
pass_bootloader_install_info(*args, **kwargs)[source]

Accepts the results of bootloader installation.

This method acts as a vendor passthru and accepts the result of bootloader installation. If the bootloader installation was successful, then it notifies the baremetal to proceed to reboot and makes the instance active. If bootloader installation failed, then it sets provisioning as failed and powers off the node.

Parameters:
  • task – A TaskManager object.
  • kwargs

    The arguments sent with vendor passthru. The expected kwargs are:

    'key': The deploy key for authorization
    'status': 'SUCCEEDED' or 'FAILED'
    'error': The error message if status == 'FAILED'
    'address': The IP address of the ramdisk
    
pass_deploy_info(*args, **kwargs)[source]

Continues the iSCSI deployment from where ramdisk left off.

This method continues the iSCSI deployment from the conductor node and writes the deploy image to the bare metal’s disk. After that, it does the following depending on boot_option for deploy:

  • If the boot_option requested for this deploy is ‘local’, then it sets the node to boot from disk (ramdisk installs the boot loader present within the image to the bare metal’s disk).
  • If the boot_option requested is ‘netboot’ or no boot_option is requested, it finds/creates the boot ISO to boot the instance image, attaches the boot ISO to the bare metal and then sets the node to boot from CDROM.
Parameters:
  • task – a TaskManager instance containing the node to act on.
  • kwargs – kwargs containing parameters for iSCSI deployment.
Raises:

InvalidState

validate(task, method, **kwargs)[source]

Validate vendor-specific actions.

Checks if a valid vendor passthru method was passed and validates the parameters for the vendor passthru method.

Parameters:
  • task – a TaskManager instance containing the node to act on.
  • method – method to be validated.
  • kwargs – kwargs containing the vendor passthru method’s parameters.
Raises:

MissingParameterValue, if some required parameters were not passed.

Raises:

InvalidParameterValue, if any of the parameters have invalid value.

This Page