]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
3PAR don't log version numbers every stats update
authorWalter A. Boring IV <walter.boring@hp.com>
Thu, 23 Apr 2015 16:34:35 +0000 (09:34 -0700)
committerWalter A. Boring IV <walter.boring@hp.com>
Thu, 23 Apr 2015 22:19:29 +0000 (15:19 -0700)
After the 3PAR drivers were refactored to remove the local
file locks, the login mechanism was logging the common and
client version numbers on every driver entry point.

This patch removes that logging except at driver startup.

Change-Id: Ib7732817a45cbdfdf975df13dbaf9bc0462a1dc0
Closes-Bug: #1447697

cinder/volume/drivers/san/hp/hp_3par_common.py

index 6b90b7ec8c830fa18416111a244e6110c3d18661..15f9376002d449ed1517f33f21a3fb7249d5782d 100644 (file)
@@ -172,10 +172,11 @@ class HP3PARCommon(object):
         2.0.38 - Add stats for hp3par goodness_function and filter_function
         2.0.39 - Added support for updated detach_volume attachment.
         2.0.40 - Make the 3PAR drivers honor the pool in create  bug #1432876
+        2.0.41 - Only log versions at startup.  bug #1447697
 
     """
 
-    VERSION = "2.0.40"
+    VERSION = "2.0.41"
 
     stats = {}
 
@@ -267,9 +268,8 @@ class HP3PARCommon(object):
             known_hosts_file=known_hosts_file)
 
     def client_logout(self):
-        LOG.info(_LI("Disconnect from 3PAR REST and SSH %s"), self.uuid)
+        LOG.debug("Disconnect from 3PAR REST and SSH %s", self.uuid)
         self.client.logout()
-        LOG.info(_LI("logout Done %s"), self.uuid)
 
     def do_setup(self, context):
         if hp3parclient is None:
@@ -281,9 +281,13 @@ class HP3PARCommon(object):
             self.API_VERSION = wsapi_version['build']
         except hpexceptions.UnsupportedVersion as ex:
             raise exception.InvalidInput(ex)
-        LOG.info(_LI("HP3PARCommon %(common_ver)s, hp3parclient %(rest_ver)s"),
-                 {"common_ver": self.VERSION,
-                  "rest_ver": hp3parclient.get_version_string()})
+
+        if context:
+            # The context is None except at driver startup.
+            LOG.info(_LI("HP3PARCommon %(common_ver)s,"
+                         "hp3parclient %(rest_ver)s"),
+                     {"common_ver": self.VERSION,
+                      "rest_ver": hp3parclient.get_version_string()})
         if self.config.hp3par_debug:
             self.client.debug_rest(True)