]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix error log level in restore-backup routine
authorling-yun <zengyunling@huawei.com>
Mon, 7 Jul 2014 08:51:24 +0000 (16:51 +0800)
committerJay S. Bryant <jsbryant@us.ibm.com>
Tue, 5 Aug 2014 18:57:52 +0000 (13:57 -0500)
When doing backup-restore operation, it needs volume's size is not less
than backup's size.
But in backup-restore routine, when volume's size is bigger than backup's
size, it logs the the info of volume's size and backup's size to warn
level, which I think it should log the info to info level.
This bug fix it.

Change-Id: Ic7210e3b018053be7a6f567cd0a7b20d51d403b8
Closes-Bug: #1338481

cinder/backup/manager.py

index fb8d266c8bdd3f5e2eca23b212f99e4546d0a5f4..d20e4440ffe247d38d804fca9620390103e78c2d 100644 (file)
@@ -322,10 +322,13 @@ class BackupManager(manager.SchedulerDependentManager):
             raise exception.InvalidBackup(reason=err)
 
         if volume['size'] > backup['size']:
-            LOG.warn('Volume: %s, size: %d is larger than backup: %s, '
-                     'size: %d, continuing with restore.',
-                     volume['id'], volume['size'],
-                     backup['id'], backup['size'])
+            LOG.info(_('Volume: %(vol_id)s, size: %(vol_size)d is '
+                       'larger than backup: %(backup_id)s, '
+                       'size: %(backup_size)d, continuing with restore.'),
+                     {'vol_id': volume['id'],
+                      'vol_size': volume['size'],
+                      'backup_id': backup['id'],
+                      'backup_size': backup['size']})
 
         backup_service = self._map_service_to_driver(backup['service'])
         configured_service = self.driver_name