]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixed missing log variable types
authorBridget McGinnis <bfmcginnis@gmail.com>
Fri, 11 Sep 2015 04:35:05 +0000 (23:35 -0500)
committerBridget McGinnis <bfmcginnis@gmail.com>
Fri, 11 Sep 2015 16:10:17 +0000 (11:10 -0500)
There were several cases of log messages that were missing
string formatting types. This patch adds the missing types.

Change-Id: If4336dafeb455cc1edd958219b1ffdd50bb2ca05
Closes-Bug: #1494574

cinder/consistencygroup/api.py
cinder/volume/drivers/emc/emc_vmax_masking.py
cinder/volume/drivers/emc/emc_vnx_cli.py
cinder/volume/drivers/san/hp/hp_3par_common.py
cinder/volume/manager.py
cinder/volume/targets/cxt.py

index 7ca334422393d1b9ec0a2b88762b8df898f0625a..77d1d7f7c0e8fca814dab756be3db03fd841a5ca 100644 (file)
@@ -170,7 +170,7 @@ class API(base.Base):
                 cgsnapshot = self.db.cgsnapshot_get(context, cgsnapshot_id)
             except exception.CgSnapshotNotFound:
                 with excutils.save_and_reraise_exception():
-                    LOG.error(_LE("CG snapshot %(cgsnap) not found when "
+                    LOG.error(_LE("CG snapshot %(cgsnap)s not found when "
                                   "creating consistency group %(cg)s from "
                                   "source."),
                               {'cg': name, 'cgsnap': cgsnapshot_id})
@@ -184,7 +184,7 @@ class API(base.Base):
                                                                source_cgid)
             except exception.ConsistencyGroupNotFound:
                 with excutils.save_and_reraise_exception():
-                    LOG.error(_LE("Source CG %(source_cg) not found when "
+                    LOG.error(_LE("Source CG %(source_cg)s not found when "
                                   "creating consistency group %(cg)s from "
                                   "source."),
                               {'cg': name, 'source_cg': source_cgid})
index 18efe241d23a42148718f568a9d92bf6d0d7642f..7107382335e2bcd5fc3063ecc546c035166cf64b 100644 (file)
@@ -2051,9 +2051,9 @@ class EMCVMAXMasking(object):
                         sgInstanceName))
             else:
                 errorMessage = (_(
-                    "Storage group %(sgGroupName) "
+                    "Storage group %(sgGroupName)s "
                     "does not exist.")
-                    % {'StorageGroup': defaultStorageGroupName})
+                    % {'sgGroupName': defaultStorageGroupName})
                 LOG.error(errorMessage)
                 raise exception.VolumeBackendAPIException(
                     data=errorMessage)
index 95d370ef0933b9d22229e844fc883602981720a0..b16624c5ba3b0688fd96cfd64355c46db0e19574 100644 (file)
@@ -1674,7 +1674,7 @@ class CommandLineHelper(object):
             # When active sp is unavailable, switch to another sp
             # and set it to active and force a poll
             if self._toggle_sp():
-                LOG.debug('EMC: Command Exception: %(rc) %(result)s. '
+                LOG.debug('EMC: Command Exception: %(rc)s %(result)s. '
                           'Retry on another SP.', {'rc': rc,
                                                    'result': out})
                 kwargv['poll'] = True
@@ -2199,7 +2199,7 @@ class EMCVnxCliBase(object):
         if len(target_pool_name) == 0:
             # Destination host is using a legacy driver
             LOG.warning(_LW("Didn't get the pool information of the "
-                            "host %(s). Storage assisted Migration is not "
+                            "host %s. Storage assisted Migration is not "
                             "supported. The host may be using a legacy "
                             "driver."),
                         host['name'])
index a4abc448f8309f7117051c2199c9ed68211bff50..98afbcbc85a406b9bbbdb6b88408b966b36e4bb4 100644 (file)
@@ -443,10 +443,10 @@ class HP3PARCommon(object):
             LOG.warning(err)
         except hpexceptions.HTTPConflict as e:
             err = (_LE("Conflict detected in Virtual Volume Set"
-                       " %(volume_set): %(error)"),
-                   {"volume_set": cg_name,
-                    "error": e})
-            LOG.error(err)
+                       " %(volume_set)s: %(error)s"))
+            LOG.error(err,
+                      {"volume_set": cg_name,
+                       "error": e})
 
         volumes = self.db.volume_get_all_by_group(context, group.id)
         for volume in volumes:
index 0587c189c908221e21a690ffc94858cf5450fef9..ed8f99ada6f6fda429ce59ba48ddd1db524d31d6 100644 (file)
@@ -1048,7 +1048,7 @@ class VolumeManager(manager.SchedulerDependentManager):
                                                     image_meta)
             if not image_volume:
                 LOG.warning(_LW('Unable to clone image_volume for image '
-                                '%(image_id) will not create cache entry.'),
+                                '%(image_id)s will not create cache entry.'),
                             {'image_id': image_id})
                 return
 
@@ -1107,7 +1107,7 @@ class VolumeManager(manager.SchedulerDependentManager):
             return image_volume
         except exception.CinderException:
             LOG.exception(_LE('Failed to clone volume %(volume_id)s for '
-                              'image %(image_id).'),
+                              'image %(image_id)s.'),
                           {'volume_id': volume.id,
                            'image_id': image_meta['id']})
             try:
@@ -1320,7 +1320,7 @@ class VolumeManager(manager.SchedulerDependentManager):
             raise exception.InvalidInput(reason=six.text_type(err))
         except Exception as err:
             err_msg = (_("Validate volume connection failed "
-                         "(error: %(err)).") % {'err': six.text_type(err)})
+                         "(error: %(err)s).") % {'err': six.text_type(err)})
             LOG.error(err_msg, resource=volume)
             raise exception.VolumeBackendAPIException(data=err_msg)
 
index 3d1fc0289024a6146747380bdaf50768e5579f40..8ab161a701b63d14e5250308b30cafef57cf6050 100644 (file)
@@ -206,7 +206,7 @@ class CxtAdm(iscsi.ISCSITarget):
         if tid is None:
             LOG.error(_LE("Failed to create iscsi target for volume "
                           "id:%(vol_id)s. Please verify your configuration "
-                          "in %(volumes_dir)'"), {
+                          "in %(volumes_dir)s'"), {
                       'vol_id': vol_id,
                       'volumes_dir': volumes_dir, })
             raise exception.NotFound()