More robust device status checking with fuser¶
Implement a more robust device status checking with fuser to avoid “device is busy” issues after partitioning.
Right after partitioning, we have a sleep(3) call to avoid the “device is busy” problem. A less error-prone solution is to check with fuser, whether there is any process currently using the disk.
Replace the sleep call with a check of the mounted device with fuser. fuser returns with exit code 0 if at least one access has been found and it lists the processes. In case there’s no access, it returns with exit code 1 with no output.
lsof can also be used for checking for open files. There isn’t any advantage or disadvantage in this use-case.
Data model impact¶
REST API impact¶
Driver API impact¶
Nova driver impact¶
Other end user impact¶
The deployment can raise InstanceDeployFailure after partitioning if the device is not available after a configurable number of retries.
Instead of sleeping every time for 3 seconds, fuser will check the status immediately after the partitioning is done. This can result in an shorter deployment time.
Other deployer impact¶
New config options in the
- check_device_interval: After Ironic has completed creating the partition
table, it continues to check for activity on the attached iSCSI device status at this interval prior to copying the image to the node. Default is 1 second.
- check_device_max_retries: Number of retries for checking the device status.
Default is 20.
- Primary assignee:
- Other contributors:
Add config options to
Implement the device status check with LoopingCall.
This patch requires fuser to be installed.
Documentation should include instructions on how to configure the device status check.