[node-patches] Change in ovirt-node[master]: installer: Fix data size

fabiand at fedoraproject.org fabiand at fedoraproject.org
Wed Oct 23 16:07:56 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: installer: Fix data size
......................................................................

installer: Fix data size

Previously the installer backend didn't handl eincorrect data_size
values correctly. Now the data_size value is checked and adjusted if
necessary.

Change-Id: I724bae27a4078c10885cfb215476d3a8b116e25f
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1022380
Signed-off-by: Fabian Deutsch <fabiand at redhat.com>
---
M src/ovirt/node/installer/core/progress_page.py
1 file changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/65/20465/1

diff --git a/src/ovirt/node/installer/core/progress_page.py b/src/ovirt/node/installer/core/progress_page.py
index a1c1b42..baf4960 100644
--- a/src/ovirt/node/installer/core/progress_page.py
+++ b/src/ovirt/node/installer/core/progress_page.py
@@ -202,8 +202,14 @@
             self.config = cfg
 
         def prepare(self):
-            # Update/Write the config file
             cfg = self.config
+
+            # Data size get's a special handling because it grabs the
+            # remaining space
+            data_size = cfg.get("storage.data_size", "-1")
+            data_size = data_size if int(data_size) > 0 else "-1"
+            self.logger.debug("Using a data_size of %s" % data_size)
+
             model = defaults.Installation()
 
             model.install_on(init=[cfg["boot.device.current"]] +
@@ -213,7 +219,7 @@
                              swap_size=cfg["storage.swap_size"],
                              logging_size=cfg["storage.logging_size"],
                              config_size=cfg["storage.config_size"],
-                             data_size=cfg["storage.data_size"])
+                             data_size=data_size)
 
             kbd = defaults.Keyboard()
             kbd.update(self.config["keyboard.layout"])


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I724bae27a4078c10885cfb215476d3a8b116e25f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list