Change in vdsm[master]: hsm: Add refresh device verb

frolland at redhat.com frolland at redhat.com
Sun Mar 22 07:47:37 UTC 2015


Fred Rolland has posted comments on this change.

Change subject: hsm: Add refresh device verb
......................................................................


Patch Set 5:

(6 comments)

https://gerrit.ovirt.org/#/c/38754/5/client/vdsClient.py
File client/vdsClient.py:

Line 732:         #                               expecting 1 (1 required) got 0
Line 733:         #      refreshDevice
Line 734:         #           <GUID>
Line 735:         #           Refresh multipath device - update the device size
Line 736:         #           after it was resized on the storage server
> This should be in the commit message, not here.
Done
Line 737:         validateArgTypes(args, [str], requiredArgsNumber=1)
Line 738:         guid = args[0]
Line 739:         res = self.s.refreshDevice(guid)
Line 740:         if res['status']['code']:


https://gerrit.ovirt.org/#/c/38754/5/vdsm/storage/multipath.py
File vdsm/storage/multipath.py:

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 92:     timeout = config.getint('irs', 'scsi_rescan_maximal_timeout')
Line 93:     log.debug("Starting multipath resize (guid=%s)" % guid)
> Few issues related to logging and error messages:
Done
Line 94:     proc = utils.execCmd([constants.EXT_MULTIPATH_RESIZE, guid], sudo=True,
Line 95:                          sync=False, execCmdLogger=log)
Line 96:     try:
Line 97:         proc.wait(timeout)


Line 99:         if proc.returncode is None:
Line 100:             log.debug("Multipath resize timeout")
Line 101:             zombiereaper.autoReapPID(proc.pid)
Line 102:             raise Error("Timeout resizing (guid=%s) (pid=%s)"
Line 103:                         % (guid, proc.pid))
> Lets use:
Done
Line 104:         if proc.returncode != 0:
Line 105:             stderr = proc.stderr.read(512)
Line 106:             log.debug("Multipath resize failed (guid=%s) : %r"
Line 107:                       % (guid, stderr))


Line 103:                         % (guid, proc.pid))
Line 104:         if proc.returncode != 0:
Line 105:             stderr = proc.stderr.read(512)
Line 106:             log.debug("Multipath resize failed (guid=%s) : %r"
Line 107:                       % (guid, stderr))
> Same, the log is not needed because we raise.
Done
Line 108:             raise Error("Multipath resize failed (guid=%s) : %r"
Line 109:                         % (guid, stderr))
Line 110:     log.debug("Multipath resize finished (guid=%s)" % guid)
Line 111: 


Line 105:             stderr = proc.stderr.read(512)
Line 106:             log.debug("Multipath resize failed (guid=%s) : %r"
Line 107:                       % (guid, stderr))
Line 108:             raise Error("Multipath resize failed (guid=%s) : %r"
Line 109:                         % (guid, stderr))
> Lets use:
Done
Line 110:     log.debug("Multipath resize finished (guid=%s)" % guid)
Line 111: 
Line 112: 
Line 113: def deduceType(a, b):


Line 106:             log.debug("Multipath resize failed (guid=%s) : %r"
Line 107:                       % (guid, stderr))
Line 108:             raise Error("Multipath resize failed (guid=%s) : %r"
Line 109:                         % (guid, stderr))
Line 110:     log.debug("Multipath resize finished (guid=%s)" % guid)
> Lets use:
Done
Line 111: 
Line 112: 
Line 113: def deduceType(a, b):
Line 114:     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: 5
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