Change in vdsm[master]: utils: split out execCmd wrapping logic

alitke at redhat.com alitke at redhat.com
Thu Oct 8 17:26:15 UTC 2015


Adam Litke has posted comments on this change.

Change subject: utils: split out execCmd wrapping logic
......................................................................


Patch Set 1:

(3 comments)

https://gerrit.ovirt.org/#/c/47107/1/lib/vdsm/utils.py
File lib/vdsm/utils.py:

Line 666
Line 667
Line 668
Line 669
Line 670
> This belongs to execCmd - it does not wrap the command.
I'll keep it as part of execCmd in this patch.  Killing it would be a different patch,


Line 628: _ANY_CPU = ["0-%d" % (os.sysconf('SC_NPROCESSORS_ONLN') - 1)]
Line 629: _USING_CPU_AFFINITY = config.get('vars', 'cpu_affinity') != ""
Line 630: 
Line 631: 
Line 632: def wrap_command(command, ioclass=None, ioclassdata=None, nice=None,
> How about moving this to cmdutils.wrap_command?
Perhaps... just have to rename all of the arguments since they are the same as function names in cmdutils.
Line 633:                  setsid=False, sudo=False, reset_cpu_affinity=True):
Line 634:     if ioclass is not None:
Line 635:         command = cmdutils.ionice(command, ioclass=ioclass,
Line 636:                                   ioclassdata=ioclassdata)


Line 674:     finish, the new subprocess would die immediately.
Line 675:     """
Line 676: 
Line 677:     command = wrap_command(command, ioclass, ioclassdata, nice, setsid, sudo,
Line 678:                            resetCpuAffinity)
> Must use kwarg style key=value for all kwargs.
of course...
Line 679:     if not printable:
Line 680:         printable = command
Line 681: 
Line 682:     execCmdLogger.debug(cmdutils.command_log_line(printable, cwd=cwd))


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I98a01c4e8c80202b8e897dacc7628504d3cf7771
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list