[node-patches] Change in ovirt-node[master]: Making the install device selection page use only disk devices.

fabiand at redhat.com fabiand at redhat.com
Wed Jan 21 10:30:08 UTC 2015


Fabian Deutsch has posted comments on this change.

Change subject: Making the install device selection page use only disk devices.
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.ovirt.org/#/c/37043/3/src/ovirt/node/utils/storage.py
File src/ovirt/node/utils/storage.py:

Line 134:         for _dev in dev_names:
Line 135:             dev = translate_multipath_device(_dev)
Line 136:             self.logger.debug("Checking device %s (%s)" % (dev, _dev))
Line 137:             disk_type_cmd = "lsblk -ino TYPE %s --nodeps" % dev
Line 138:             disk_type_popen = subprocess_closefds(disk_type_cmd,
As Douglas suggested, please use a list here: ["lsblk", "-ino", …] and drop the shell=True argument.
This will be safeer, and will also work with whitespaces included in filenames.
Line 139:                                                   shell=True,
Line 140:                                                   stdout=subprocess.PIPE,
Line 141:                                                   stderr=subprocess.STDOUT)
Line 142:             dev_type, dev_type_err = disk_type_popen.communicate()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If1e398ff28b984093163c13c13af125eb7428bec
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Anatoly Litovsky <tlitovsk at redhat.com>
Gerrit-Reviewer: Anatoly Litovsky <tlitovsk at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes



More information about the node-patches mailing list