Change in vdsm[master]: storage: Add multipath-resize command line tool

nsoffer at redhat.com nsoffer at redhat.com
Tue Mar 10 09:39:56 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: storage: Add multipath-resize command line tool
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/38467/1/vdsm/storage/multipath-resize
File vdsm/storage/multipath-resize:

Line 136: 
Line 137: def resize_map(guid):
Line 138:     log.debug("Resizing map %s", guid)
Line 139:     cmd = [MULTIPATHD.cmd, "-k'resize map %s'" % guid]
Line 140:     start = utils.monotonic_time()
> any reason for not using utils.execCmd ?
This is not needed here because we have a single thread and short living process, so we do not need any of the features added by utils.execCmd, but for consistency with other code is would be good idea to use this utility.

I will update this in the next version.
Line 141:     p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Line 142:     out, err = p.communicate()
Line 143:     if p.returncode != 0:
Line 144:         raise Error("Resizing map %s failed: %s" % (guid, err))


Line 139:     cmd = [MULTIPATHD.cmd, "-k'resize map %s'" % guid]
Line 140:     start = utils.monotonic_time()
Line 141:     p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Line 142:     out, err = p.communicate()
Line 143:     if p.returncode != 0:
We have seen multipathd exit with zero, but writes "fail" to stdout/stderr.

- Should check this with Ben, maybe we need to change the success test to consider the output.
- Open a bug for multipath to fix this poor behavior.
Line 144:         raise Error("Resizing map %s failed: %s" % (guid, err))
Line 145:     elapsed = utils.monotonic_time() - start
Line 146:     log.debug("Resized map %s in %.2f seconds", guid, elapsed)
Line 147: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I229ef55555fa757989329939a9267041785f2c0f
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: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Freddy 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