From 174ebde8e6a8cddc2db615b127d7d0066dabaa31 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Thu, 5 Dec 2013 18:12:33 -0500 Subject: [PATCH] Brick LVM: Set C locale when gathering PV info Some locales use commas as decimal separators, which means that code breaks when someone expects to be able to use the PV size as a float. Change-Id: Idceb405e021ea8a0f44e19be43bad1307fbbb51c Related-Bug: 1219963 --- cinder/brick/local_dev/lvm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cinder/brick/local_dev/lvm.py b/cinder/brick/local_dev/lvm.py index 872e4fe19..f69b5af6a 100644 --- a/cinder/brick/local_dev/lvm.py +++ b/cinder/brick/local_dev/lvm.py @@ -259,7 +259,8 @@ class LVM(executor.Executor): :returns: List of Dictionaries with PV info """ - cmd = ['pvs', '--noheadings', + cmd = ['env', 'LC_ALL=C', 'LANG=C', + 'pvs', '--noheadings', '--unit=g', '-o', 'vg_name,name,size,free', '--separator', ':'] -- 2.45.2