Federico Simoncelli has posted comments on this change.
Change subject: udev: Race fix- load and trigger dev rule(#891300) ......................................................................
Patch Set 1: (2 inline comments)
.................................................... File vdsm/storage/hsm.py Line 2925: """ Line 2926: supervdsm.getProxy().appropriateDevice(guid, thiefId) Line 2927: supervdsm.getProxy().udevReloadRules(guid) Line 2928: supervdsm.getProxy().udevTrigger(guid) Line 2929: supervdsm.getProxy().udevSettle(guid) Then we can set a timeout with --timeout=<seconds> Line 2930: try: Line 2931: devPath = '/dev/mapper/%s' % guid Line 2932: fileUtils.validateQemuReadable(devPath) Line 2933: except OSError:
.................................................... File vdsm/supervdsmServer.py Line 226: return configNetwork.setSafeNetworkConfig() Line 227: Line 228: @logDecorator Line 229: def udevReloadRules(self, guid): Line 230: cmd = [EXT_UDEVADM, 'control', '--reload-rules'] We could dynamically use --reload or --reload-rules given the result of "udevadm --version" >= 181. The udevadm version can be cached so that it's done only once (let's assume that we don't support major upgrades without restarting vdsm, and anyway --reload-rules is still working on 182 even if it's not reported by the help). Line 231: rc, out, err = misc.execCmd(cmd, sudo=False) Line 232: if rc: Line 233: raise OSError(errno.EINVAL, "Could not reload-rules for device \ Line 234: %s, out %s\nerr %s" % (guid, out, err))
-- To view, visit http://gerrit.ovirt.org/10758 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If3b2008a3d9df2dcaf54190721c2dd9764338627 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vered Volansky vvolansk@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server