[node-patches] Change in ovirt-node[master]: dry: storage_vol_page replace udisksctl to blockdev

dougsland at redhat.com dougsland at redhat.com
Wed Jul 16 03:42:09 UTC 2014


Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: dry: storage_vol_page replace udisksctl to blockdev
......................................................................

dry: storage_vol_page replace udisksctl to blockdev

udisksctl is not availble in CentOS6 making dry mode fail.
This patch replaces udisksctl to blockdev tool.

Change-Id: I1c7c1a06f0e20d54c7b6b56b7256ec12cc4764d8
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
---
M src/ovirt/node/installer/core/storage_vol_page.py
1 file changed, 3 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/34/30134/1

diff --git a/src/ovirt/node/installer/core/storage_vol_page.py b/src/ovirt/node/installer/core/storage_vol_page.py
index ed2ee39..81a26f9 100644
--- a/src/ovirt/node/installer/core/storage_vol_page.py
+++ b/src/ovirt/node/installer/core/storage_vol_page.py
@@ -156,11 +156,9 @@
 
     def __get_default_sizes(self):
         if self.application.args.dry:
-            udiskscmd = "udisksctl info -b /dev/[sv]da* | grep Size"
-            stdout = process.check_output(udiskscmd,
-                                          shell=True)
-            self._drive_size = (int(stdout.strip().split(":")[1].strip())
-                                / 1024 / 1024)
+            cmd = "blockdev --getsize64 /dev/[sv]da"
+            stdout = process.check_output(cmd, shell=True)
+            self._drive_size = int(stdout) / 1024 / 1024
             return {"storage.efi_size": "256",
                     "storage.root_size": "50",
                     "storage.swap_size": "0",


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c7c1a06f0e20d54c7b6b56b7256ec12cc4764d8
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>



More information about the node-patches mailing list