Change in vdsm[master]: hsm: Add refresh device verb
nsoffer at redhat.com
nsoffer at redhat.com
Sun Mar 22 11:04:20 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: hsm: Add refresh device verb
......................................................................
Patch Set 8:
(6 comments)
https://gerrit.ovirt.org/#/c/38754/8/vdsm/storage/multipath.py
File vdsm/storage/multipath.py:
Line 76: def resize(guid):
Line 77: """
Line 78: In case the LUN was increased on storage server, in order to see the
Line 79: changes it is needed to rescan the device path
Line 80: and resize the multipath map.
Please reformat the paragraph.
Line 81:
Line 82: This method calls multipath-resize tool which will perform the following:
Line 83: - Perform scsi scan of the device paths
Line 84: - Resize the multipath map
Line 83: - Perform scsi scan of the device paths
Line 84: - Resize the multipath map
Line 85:
Line 86: SCSI scan is a blocking operation, so it is needed to run in external tool.
Line 87: The call to the script is blocking up to 30 seconds.
The call to the script is blocking up to 30 seconds -> The call will block up to scsi_rescan_maximal_timeout seconds (30 seconds by default).
Line 88: If the operation times out, an error is raised.
Line 89: If the return code is not 0, an error is raised.
Line 90: TODO: move to supervdsm when zombiereaper is functional there.
Line 91: """
Line 85:
Line 86: SCSI scan is a blocking operation, so it is needed to run in external tool.
Line 87: The call to the script is blocking up to 30 seconds.
Line 88: If the operation times out, an error is raised.
Line 89: If the return code is not 0, an error is raised.
Better use:
Raises multipath.Error if operation times out or multipath-resize failed.
Line 90: TODO: move to supervdsm when zombiereaper is functional there.
Line 91: """
Line 92: timeout = config.getint('irs', 'scsi_rescan_maximal_timeout')
Line 93: log.debug("Resizing device %r", guid)
Line 96: try:
Line 97: proc.wait(timeout)
Line 98: finally:
Line 99: if proc.returncode is None:
Line 100: log.debug("Multipath resize timeout")
Not needed as we raise - same as returncode != 0 case.
Line 101: zombiereaper.autoReapPID(proc.pid)
Line 102: raise Error("Timeout resizing device %r (pid=%s)"
Line 103: % (guid, proc.pid))
Line 104: if proc.returncode != 0:
Line 102: raise Error("Timeout resizing device %r (pid=%s)"
Line 103: % (guid, proc.pid))
Line 104: if proc.returncode != 0:
Line 105: stderr = proc.stderr.read(512)
Line 106: raise Error(" Error resizing device %r: %r"
" Error" -> "Error"
Line 107: % (guid, stderr))
Line 108: log.debug("Resizing device %r finished" % guid)
Line 109:
Line 110:
Line 104: if proc.returncode != 0:
Line 105: stderr = proc.stderr.read(512)
Line 106: raise Error(" Error resizing device %r: %r"
Line 107: % (guid, stderr))
Line 108: log.debug("Resizing device %r finished" % guid)
Logging calls should send format and parameters, not preformatted string.
log.debug("Resizing device %r finished", guid)
Line 109:
Line 110:
Line 111: def deduceType(a, b):
Line 112: if a == b:
--
To view, visit https://gerrit.ovirt.org/38754
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6fbeec7920a7943a9b1ea9dbd93477fa9b642f5b
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Freddy Rolland <frolland 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: Dan Kenigsberg <danken 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