Federico Simoncelli has submitted this change and it was merged.

Change subject: udevadm: Handle errors and timeouts in udevadm.settle()
......................................................................


udevadm: Handle errors and timeouts in udevadm.settle()

In commit 4c10d3d10c (multipath: Wait for udev events after rescan) we started
to invoke udevadm.settle() during multipath.rescan(). Since rescan is performed
in the storageRefresh thread, and we did not handle exceptions, a timeout in
udevadm.settle() will cause HSM initialization to fail and leave vdsm in
"initializing" state.

udev timeout behavior is undocumented. Looking into the code, we found two types
of logic:
- On el6, el7 and f20, if timeout occurs, rc=1 and timeout info
  printed to stdout
- On f21, timeout is ignored. We opened bz for udev to fix this:
  https://bugzilla.redhat.com/1209474

Handling the errors in settle() rather than propagating them seems more useful
because we do not want to fail the entire operation only because udev fails to
wait for events.  This is the same behavior implemented in hba.rescan.

Change-Id: Ia7eac964ca9bd399ff6e8a23d591a7f78651740f
Relates-To: https://bugzilla.redhat.com/1205877
Signed-off-by: Ala Hino <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/39594
Reviewed-by: Allon Mureinik <[email protected]>
Reviewed-by: Nir Soffer <[email protected]>
Reviewed-by: Freddy Rolland <[email protected]>
Reviewed-by: Federico Simoncelli <[email protected]>
---
M vdsm/storage/udevadm.py
1 file changed, 11 insertions(+), 7 deletions(-)

Approvals:
  Nir Soffer: Looks good to me, but someone else must approve
  Federico Simoncelli: Looks good to me, approved
  Allon Mureinik: Looks good to me, but someone else must approve
  Freddy Rolland: Looks good to me, but someone else must approve
  Ala Hino: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7eac964ca9bd399ff6e8a23d591a7f78651740f
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Ala Hino <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Amit Aviram <[email protected]>
Gerrit-Reviewer: Candace Sheremeta <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Freddy Rolland <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to