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

tlitovsk at redhat.com tlitovsk at redhat.com
Mon Jan 19 08:09:48 UTC 2015


Anatoly Litovsky has uploaded a new change for review.

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

Making the install device selection page use only disk devices.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1179085

Change-Id: If1e398ff28b984093163c13c13af125eb7428bec
Signed-off-by: Tolik Litovsky <tlitovsk at redhat.com>
---
M src/ovirt/node/utils/storage.py
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/43/37043/1

diff --git a/src/ovirt/node/utils/storage.py b/src/ovirt/node/utils/storage.py
index 4df851a..10032ed 100644
--- a/src/ovirt/node/utils/storage.py
+++ b/src/ovirt/node/utils/storage.py
@@ -22,6 +22,7 @@
 from ovirt.node import base
 from ovirt.node.utils.fs import File
 from ovirt.node.utils import system
+import ovirtnode.ovirtfunctions as _functions
 import os
 
 
@@ -132,6 +133,14 @@
         for _dev in dev_names:
             dev = translate_multipath_device(_dev)
             self.logger.debug("Checking device %s (%s)" % (dev, _dev))
+            disk_type_cmd="lsblk -inpo TYPE %s --nodeps" % dev
+            disk_type_popen = _functions.subprocess_closefds(disk_type_cmd, shell=True,
+                                                             stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+            dev_type, dev_type_err = disk_type_popen.communicate()
+            if dev_type.strip()!="disk":
+                self.logger.warning("Device is not disk but probably partition or lvm" % dev)
+                continue
+            
             if dev in devices:
                 self.logger.warning("Device is already in dict: %s" % dev)
                 continue


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1e398ff28b984093163c13c13af125eb7428bec
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Anatoly Litovsky <tlitovsk at redhat.com>



More information about the node-patches mailing list