Ramesh N has uploaded a new change for review.

Change subject: gluster: fix for lvchange regression in rhel 6.8
......................................................................

gluster: fix for lvchange regression in rhel 6.8

  There is a regression in lvchange command. Changes are not
applied until lv reactivation. We are changing the zeroing flag
of lv using lvchange command. This can be moved to lvconvert
command and lvchange cab be removed completely.

Bug-Url: https://bugzilla.redhat.com/1332166

Change-Id: I1cdd4f53b8494223b75a2c2041c2e8945b94ca2c
Signed-off-by: Ramesh Nachimuthu <[email protected]>
---
M vdsm/gluster/exception.py
M vdsm/gluster/storagedev.py
2 files changed, 2 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/69/57069/1

diff --git a/vdsm/gluster/exception.py b/vdsm/gluster/exception.py
index 10fa5ae..a3608d7 100644
--- a/vdsm/gluster/exception.py
+++ b/vdsm/gluster/exception.py
@@ -431,17 +431,6 @@
                        "data alignment %s" % (device, alignment)
 
 
-class GlusterHostStorageDeviceLVChangeFailedException(GlusterHostException):
-    code = 4415
-
-    def __init__(self, poolName=None, rc=0, out=(), err=()):
-        self.rc = rc
-        self.out = out
-        self.err = err
-        self.message = "Failed to run lvchange for the thin pool: %s" % (
-            poolName)
-
-
 class GlusterHostStorageDeviceMakeDirsFailedException(GlusterHostException):
     code = 4416
     message = "Make directories failed"
diff --git a/vdsm/gluster/storagedev.py b/vdsm/gluster/storagedev.py
index ca1ee01..c246fea 100644
--- a/vdsm/gluster/storagedev.py
+++ b/vdsm/gluster/storagedev.py
@@ -48,9 +48,6 @@
 _lvconvertCommandPath = utils.CommandPath("lvconvert",
                                           "/sbin/lvconvert",
                                           "/usr/sbin/lvconvert",)
-_lvchangeCommandPath = utils.CommandPath("lvchange",
-                                         "/sbin/lvchange",
-                                         "/usr/sbin/lvchange",)
 _vgscanCommandPath = utils.CommandPath("vgscan",
                                        "/sbin/vgscan",
                                        "/usr/sbin/vgscan",)
@@ -201,16 +198,12 @@
                                          '--thinpool', vgPoolName,
                                          '--poolmetadata',
                                          "%s/%s" % (vg.name, metaName),
-                                         '--poolmetadataspar', 'n', '-y'])
+                                         '--poolmetadataspar', 'n', '-y',
+                                         '--zero', 'n'])
 
         if rc:
             raise ge.GlusterHostStorageDeviceLVConvertFailedException(
                 vg.path, alignment, rc, out, err)
-        rc, out, err = commands.execCmd([_lvchangeCommandPath.cmd,
-                                         '--zero', 'n', vgPoolName])
-        if rc:
-            raise ge.GlusterHostStorageDeviceLVChangeFailedException(
-                vgPoolName, rc, out, err)
         _reset_blivet(blivetEnv)
         return blivetEnv.devicetree.getDeviceByName(poolLv.name)
 


-- 
To view, visit https://gerrit.ovirt.org/57069
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cdd4f53b8494223b75a2c2041c2e8945b94ca2c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ramesh N <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to