Change in vdsm[master]: utils: Move functionality from storage.misc

ykaplan at redhat.com ykaplan at redhat.com
Mon Aug 18 08:22:22 UTC 2014


Yeela Kaplan has posted comments on this change.

Change subject: utils: Move functionality from storage.misc
......................................................................


Patch Set 3:

(4 comments)

Dan,
 sorry for ignoring comments on ps2, didn't see them.

Douglas,
thank you for pointing it out to me.

http://gerrit.ovirt.org/#/c/30850/3//COMMIT_MSG
Commit Message:

Line 6: 
Line 7: utils: Move functionality from storage.misc
Line 8: 
Line 9: move rotateFiles into utils.
Line 10: use ovirt node persist and unpersist in rotateFile.
> Please do not change anything in the code moved from misc in this patch!
Done
Line 11: 
Line 12: Change-Id: I091083caa868931fb3a0bcf3bc2df98091daee45


http://gerrit.ovirt.org/#/c/30850/3/lib/vdsm/utils.py
File lib/vdsm/utils.py:

Line 149: 
Line 150:     logging.debug("dir: %s, prefixName: %s, versions: %s" %
Line 151:                   (directory, prefixName, gen))
Line 152:     gen = int(gen)
Line 153:     files = os.listdir(directory)
> Why overwrite the same variable? And what about my ps2 comments?
not touching the code logic itself. to Nir's request.

This was the original code.
Line 154:     files = glob.glob("%s*" % prefixName)
Line 155:     fd = {}
Line 156:     for fname in files:
Line 157:         name = fname.rsplit('.', 1)


Line 187:                 os.rename(oldName, newName)
Line 188:         except:
Line 189:             pass
Line 190:         if isOvirtNode() and persist and not cp:
Line 191:             NodeCfg().persist(newName)
> this is  not the original logic of the code moved from misc - move to anthe
Done
Line 192: 
Line 193: 
Line 194: def _parseMemInfo(lines):
Line 195:     """


http://gerrit.ovirt.org/#/c/30850/3/vdsm/storage/multipath.py
File vdsm/storage/multipath.py:

Line 172:         rc = misc.execCmd(cmd, sudo=True)[0]
Line 173:         if rc != 0:
Line 174:             raise se.MultipathSetupError()
Line 175:     if utils.isOvirtNode():
Line 176:         NodeCfg().persist(self._MPATH_CONF)
> First, this is not related to moving code from misc to utils - move to anot
Done
Line 177: 
Line 178:     # Flush all unused multipath device maps
Line 179:     misc.execCmd([constants.EXT_MULTIPATH, "-F"], sudo=True)
Line 180: 


-- 
To view, visit http://gerrit.ovirt.org/30850
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I091083caa868931fb3a0bcf3bc2df98091daee45
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan 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