In-band cleaning support in iSCSI deploy drivers¶
Current deploy drivers that make use of iSCSI don’t support in-band cleaning. We need to make these drivers support in-band cleaning operations as well.
Drivers that do iSCSI based deployment don’t support in-band cleaning today. Hence in-band cleaning steps like disk erase, in-band RAID configuration, etc cannot be performed on these nodes which are registered with these drivers.
The following drivers (omitting the testing drivers) do iSCSI based deployment today:
Deprecate the opt
CONF.agent.agent_erase_devices_priorityand move that to
Add the following methods to iscsi_deploy.ISCSIDeploy (these methods will do the same things as what AgentDeploy does today)
prepare_cleaning- This method will create the Neutron cleaning ports for each of the Ironic ports and will call
self.bootto prepare for booting the ramdisk and return
states.CLEANWAIT. The method definition will be as follows:
def prepare_cleaning(self, task): """Boot into the agent to prepare for cleaning. :param task: a TaskManager object containing the node :raises NodeCleaningFailure: if the previous cleaning ports cannot be removed or if new cleaning ports cannot be created :returns: states.CLEANWAIT to signify an asynchronous prepare """
tear_down_cleaning- This method will delete the cleaning ports created for the Ironic ports and will call
self.bootto clean up the ramdisk boot. It will return None. The method definition will be as follows:
def tear_down_cleaning(self, task): """Cleans up the environment after cleaning. :param task: a TaskManager object containing the node :raises NodeCleaningFailure: if the cleaning ports cannot be removed """
execute_clean_step- This method will call
deploy_utils.agent_execute_clean_step. The method definition will be as follows:
def execute_clean_step(self, task, step): """Execute a clean step asynchronously on the agent. :param task: a TaskManager object containing the node :param step: a clean step dictionary to execute :raises: NodeCleaningFailure if the agent does not return a command status :returns: states.CLEANWAIT to signify the step will be completed async """
get_clean_steps- This method will call
deploy_utils.agent_get_clean_stepsto get the cleaning steps from the agent ramdisk. It will also reassign the cleaning priority to disk erase.
This will return an empty list if bash ramdisk is used. It will be detected by checking if
agent_urlis present in node’s driver_internal_info.
The method definition will be as follows:
def get_clean_steps(self, task): """Get the list of clean steps from the agent. :param task: a TaskManager object containing the node :returns: A list of clean step dictionaries. Returns an empty list if bash ramdisk is used. """
For deployers who have been using DIB ramdisk, the node will be stuck i n
states.CLEANWAITwhen they try to do cleaning. This is because DIB ramdisk doesn’t heartbeat like agent ramdisk. Hence, such deployers might face the issue with nodes moving to
states.CLEANFAILas node enters cleaning. To overcome this problem, the following will be done:
Send the bash ramdisk parameters (deploy_key, iscsi_target_iqn, etc) while booting the deploy ramdisk for cleaning. It will enable bash ramdisk to invoke pass_deploy_info vendor passthru.
If node is in CLEANWAIT in pass_deploy_info vendor passthru, then we set the clean steps for the node and ask conductor to resume cleaning.
We also skip validation for pass_deploy_info vendor passthru if node is in CLEANWAIT state.
Data model impact¶
State Machine Impact¶
REST API impact¶
Client (CLI) impact¶
RPC API impact¶
Driver API impact¶
Nova driver impact¶
iscsi_deploy.ISCSIDeploy will do in-band disk erase which
will be a security benefit for tenants.
Other end user impact¶
Other deployer impact¶
- Primary assignee:
Add new methods the
iscsi_deploy.ISCSIDeployfor in-band cleaning.
Modify pass_deploy_info to make it ready when it is invoked during cleaning.
Completion of work for deploy-boot interface separation  to enable in-band cleaning for all drivers.
Unit tests will be added.
Upgrades and Backwards Compatibility¶
The new CONF option and it’s impact will be documented.