Change in vdsm[master]: multipath: Wait for udev events after rescan

nsoffer at redhat.com nsoffer at redhat.com
Sun Mar 29 22:10:03 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: multipath: Wait for udev events after rescan
......................................................................


Patch Set 1:

(3 comments)

https://gerrit.ovirt.org/#/c/39288/1//COMMIT_MSG
Commit Message:

Line 14:   may not been handled yet when iscsiadm existed.
Line 15: 
Line 16: This patch replaces the minimal scsi timeout with udevadm.settle(),
Line 17: waiting until current udev events are handled.  Since we perform both FC
Line 18: and iSCSI scan, the correct place for waiting is in multipath.rescan()
> I'm not sure I understand the logical inference here. Do you make only mult
Previously we "waited" after iscsi scan, so I could replace the time.sleep()
in iscsi.rescan() with udevadm.settle(). Since we do also fc scan, we should
wait also there. Instead of waiting twice, we wait in the single place calling
both.
Line 19: and not in iscsi.rescan().
Line 20: 
Line 21: A new configuration was introduced, allowing fine tuning of settle
Line 22: timeout in the field.


https://gerrit.ovirt.org/#/c/39288/1/vdsm/storage/iscsi.py
File vdsm/storage/iscsi.py:

Line 412
Line 413
Line 414
Line 415
Line 416
> can you refer to this FIXME removal?
I don't think this is broken from the core and the suggested fix is complex and does not cover the main use case.

When trying to detect new devices, you don't know yet the new devices, so we cannot wait for specific devices.

When we know what we are looking for, we can wait until iscsiadm finish (typically it is very fast), and then wait for a specific device (e.g, in getDevicesVisibility).

Async scan can help when one host is very slow, and we are looking for a device on a different host, and can finish the scan quickly without being blocked by the slow host.

To support this negative flow, we will have to create a much more complex code (maybe a thread dedicated to scanning). This can be lot of fun but is not our roadmap.

If you like I can improve the comment so it document the limits of the current code.


https://gerrit.ovirt.org/#/c/39288/1/vdsm/storage/multipath.py
File vdsm/storage/multipath.py:

Line 72:     # Scanning SCSI interconnects starts a storm of udev events. Wait until all
Line 73:     # events are processed, ensuring detection of new devices and creation or
Line 74:     # update of multipath devices.
Line 75:     timeout = config.getint('irs', 'scsi_settle_timeout')
Line 76:     udevadm.settle(timeout)
> does `udevadm settle` give any indeication if the timeout was enough? it wo
No
Line 77: 
Line 78: 
Line 79: def deduceType(a, b):
Line 80:     if a == b:


-- 
To view, visit https://gerrit.ovirt.org/39288
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ieeffbdd447e96c4ec92b829388da1dc6222a2dae
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Candace Sheremeta <cshereme at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Fred Rolland <frolland at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list