Fix sleep() workaround for the "device is busy" problem

Bug #1301975 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Imre Farkas

Bug Description

Right now after partitioning the disk we have a sleep(3) to avoid the #device is busy problem, but that's not the right way to avoid this kind of problem, a better way to do it would be to check with fuser or lsof whether there's any process holding the device or if it's free (not busy).

https://github.com/openstack/ironic/blob/master/ironic/common/disk_partitioner.py#L98

Changed in ironic:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
importance: Undecided → Medium
Changed in ironic:
assignee: Lucas Alvares Gomes (lucasagomes) → nobody
description: updated
Imre Farkas (ifarkas)
Changed in ironic:
assignee: nobody → Imre Farkas (ifarkas)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/90126

Changed in ironic:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/90126
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=5166aab73ac55781a49aed6319302fd4ffa8b2be
Submitter: Jenkins
Branch: master

commit 5166aab73ac55781a49aed6319302fd4ffa8b2be
Author: Imre Farkas <email address hidden>
Date: Thu Apr 24 17:44:36 2014 +0200

    Fix workaround for the "device is busy" problem

    Right after partitioning, we have a sleep(3) 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.

    The following config options are introduced under the 'disk_partitioner'
    group:
    - check_device_interval: seconds between consecutive checks for the
    device status
    - check_device_max_retries: number of retries for checking the device
    status

    Change-Id: Icb73db5aeb16d1abc390975c2bd8bf4b486566e5
    Implements: blueprint device-status-check-with-fuser
    Closes-Bug: #1301975

Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers