]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
DRBD: Compat for current DRBDmanage versions.
authorPhilipp Marek <philipp.marek@linbit.com>
Thu, 4 Feb 2016 13:47:39 +0000 (14:47 +0100)
committerPhilipp Marek <philipp.marek@linbit.com>
Thu, 4 Feb 2016 13:52:25 +0000 (14:52 +0100)
The to-be-1.0 versions may provide additional data via a DM_INFO
tag; but as older versions don't have that (yet), we need to be
careful when asking for its value.

Change-Id: Ic800755d74ef22ec48bd3b8cd8000c610221bb52

cinder/volume/drivers/drbdmanagedrv.py

index 468c0a408e31e9c8b909124f819a1de560984e23..a385e01aa3b5c0ff35a5ebe53eb8d287a7a946ef 100644 (file)
@@ -176,6 +176,9 @@ class DrbdManageBaseDriver(driver.VolumeDriver):
             if code == dm_exc.DM_SUCCESS:
                 seen_success = True
                 continue
+            if hasattr(dm_exc, 'DM_INFO'):
+                if code == dm_exc.DM_INFO:
+                    continue
             seen_error = _("Received error string: %s") % (fmt % arg)
 
         if seen_error: