IPA service to (re)scan SCSI devices prior to getting a list of it

Bug #1551300 reported by Lucas Alvares Gomes
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ironic-python-agent
Fix Released
High
Lucas Alvares Gomes

Bug Description

Reporting this bug upstream from an internal ticket [0].

Since we boot from a ramdisk the IPA service can be started prior to the SCSI devices nodes being detected in the host OS, this will make the function list_all_block_devices() from the hardware.py module to return an empty list causing the deployment to fail. The IPA service should scan the SCSI devices prior to trying to list them.

In my local tests I've tried a couple of ways to do it:

1) Sleeping 60 seconds prior to invoking list_all_block_devices()

This works but sleeping is ugly and should be avoided.

2) Modified the .service file adding a Requirement to the systemd's systemd-udev-settle.service file [1]

For some reason it didn't work, I've also tried the "Wants: " tag for the systemd unit but failed with the same error

3) invoked the "udevadm" utility prior to listing the devices, e.g:

# udevadm trigger --verbose --dry-run --type=devices --subsystem-match=scsi_disk
# udevadm settle

This works

[0] https://bugzilla.redhat.com/show_bug.cgi?id=1312187
[1] https://github.com/systemd/systemd/blob/master/units/systemd-udev-settle.service.in

Changed in ironic-python-agent:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
Changed in ironic-python-agent:
status: New → In Progress
Dmitry Tantsur (divius)
Changed in ironic-python-agent:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic-python-agent (master)

Reviewed: https://review.openstack.org/284796
Committed: https://git.openstack.org/cgit/openstack/ironic-python-agent/commit/?id=055998c81217ededacc95f0f96a4a8bf684fbfe0
Submitter: Jenkins
Branch: master

commit 055998c81217ededacc95f0f96a4a8bf684fbfe0
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Feb 25 16:32:47 2016 +0000

    Wait for udev to settle before listing the block devices

    This patch is making the list_all_block_devices() method to wait for
    udev to settle it's event queue prior to listing the devices.

    Sometimes the ironic-python-agent service may start before all devices
    were detected and end up erroring out because it couldn't find a
    suitable disk for deployment.

    Closes-Bug: #1551300
    Change-Id: I1ae2062a711115a1ea14b79ae9ace7ddd2fff9d5

Changed in ironic-python-agent:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/ironic-python-agent 1.2.0

This issue was fixed in the openstack/ironic-python-agent 1.2.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.