[f21-branch 1/3] Fix vgcreate error when the give pesize is a float value

TimothyAsirJeyasing installerbot-noreply at redhat.com
Fri Mar 6 21:06:52 UTC 2015


From: Timothy Asir Jeyasingh <tjeyasin at redhat.com>

Currently blivet exepects pesize parm of the vgcreate function
should be an MiB. However it does not accept any floating values.
This limits pass any KiB values for pesize to create a vg.
This patch fixes the issue by accepting the given value.

Bug url: https://bugzilla.redhat.com/show_bug.cgi?id=1198568

Signed-off-by: Timothy Asir Jeyasingh <tjeyasin at redhat.com>
---
 blivet/devicelibs/lvm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blivet/devicelibs/lvm.py b/blivet/devicelibs/lvm.py
index 2b79141..1ecad89 100644
--- a/blivet/devicelibs/lvm.py
+++ b/blivet/devicelibs/lvm.py
@@ -339,7 +339,7 @@ def pvinfo(device=None):
 def vgcreate(vg_name, pv_list, pe_size):
     argv = ["vgcreate"]
     if pe_size:
-        argv.extend(["-s", "%dm" % pe_size.convertTo(spec="mib")])
+        argv.extend(["-s", "%sm" % pe_size.convertTo(spec="mib")])
     argv.extend(_getConfigArgs())
     argv.append(vg_name)
     argv.extend(pv_list)


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/f39db6748ec2fa2aed7cb7b615e4175c24e7963d


More information about the anaconda-patches mailing list