From: ling-yun Date: Mon, 7 Jul 2014 08:51:24 +0000 (+0800) Subject: Fix error log level in restore-backup routine X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=4469591c76888bad263662df424c3f266ded8d48;p=openstack-build%2Fcinder-build.git Fix error log level in restore-backup routine 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 --- diff --git a/cinder/backup/manager.py b/cinder/backup/manager.py index fb8d266c8..d20e4440f 100644 --- a/cinder/backup/manager.py +++ b/cinder/backup/manager.py @@ -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