]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Don’t log warnings in Pure initialize_connection
authorPatrick East <patrick.east@purestorage.com>
Thu, 16 Jul 2015 21:18:04 +0000 (14:18 -0700)
committerPatrick East <patrick.east@purestorage.com>
Thu, 16 Jul 2015 21:18:04 +0000 (14:18 -0700)
This method can (and is) called multiple times for the same initiator
and volume combination. Our code handles that case correctly but will
log a warning which is misleading since it is perfectly ok.

Change-Id: Ibc7bafbcd6ecd114626330d608908c955ef8abe6

cinder/volume/drivers/pure.py

index a3319a23ea60208953a5c0fd965f546ada55f63c..fb840d613545feee5de9af9c1c474e00f854b51c 100644 (file)
@@ -577,9 +577,11 @@ class PureBaseVolumeDriver(san.SanDriver):
                 if (err.code == 400 and
                         "Connection already exists" in err.text):
                     # Happens if the volume is already connected to the host.
+                    # Treat this as a success.
                     ctxt.reraise = False
-                    LOG.warning(_LW("Volume connection already exists with "
-                                    "message: %s"), err.text)
+                    LOG.debug("Volume connection already exists for Purity "
+                              "host with message: %s", err.text)
+
                     # Get the info for the existing connection
                     connected_hosts = \
                         self._array.list_volume_private_connections(vol_name)