]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Changed to INFO level logging for main cinder-backup operations
authorStephen Mulcahy <stephen.mulcahy@hp.com>
Wed, 27 Feb 2013 09:15:57 +0000 (09:15 +0000)
committerStephen Mulcahy <stephen.mulcahy@hp.com>
Wed, 27 Feb 2013 11:39:45 +0000 (11:39 +0000)
Changed create backup, restore backup and delete backup operations to
log key operations at INFO level instead of DEBUG level (so environments
like devstack see main operations by default).

Fixes bug: 1132788

Change-Id: I3b4600be8fbc1869054f81752c92936d55395185

cinder/backup/manager.py

index 96426f52559d17612d89d36f79ef3d3b24662a3d..11843cd5b28babd65dcfe0f7754d80eb6b40ece4 100755 (executable)
@@ -116,8 +116,8 @@ class BackupManager(manager.SchedulerDependentManager):
         backup = self.db.backup_get(context, backup_id)
         volume_id = backup['volume_id']
         volume = self.db.volume_get(context, volume_id)
-        LOG.debug(_('create_backup started, backup: %(backup_id)s for '
-                    'volume: %(volume_id)s') % locals())
+        LOG.info(_('create_backup started, backup: %(backup_id)s for '
+                   'volume: %(volume_id)s') % locals())
         self.db.backup_update(context, backup_id, {'host': self.host,
                                                    'service':
                                                    FLAGS.backup_service})
@@ -157,14 +157,14 @@ class BackupManager(manager.SchedulerDependentManager):
                                                    'size': volume['size'],
                                                    'availability_zone':
                                                    self.az})
-        LOG.debug(_('create_backup finished. backup: %s'), backup_id)
+        LOG.info(_('create_backup finished. backup: %s'), backup_id)
 
     def restore_backup(self, context, backup_id, volume_id):
         """
         Restore volume backups from configured backup service.
         """
-        LOG.debug(_('restore_backup started, restoring backup: %(backup_id)s'
-                    ' to volume: %(volume_id)s') % locals())
+        LOG.info(_('restore_backup started, restoring backup: %(backup_id)s'
+                   ' to volume: %(volume_id)s') % locals())
         backup = self.db.backup_get(context, backup_id)
         volume = self.db.volume_get(context, volume_id)
         self.db.backup_update(context, backup_id, {'host': self.host})
@@ -217,15 +217,15 @@ class BackupManager(manager.SchedulerDependentManager):
 
         self.db.volume_update(context, volume_id, {'status': 'available'})
         self.db.backup_update(context, backup_id, {'status': 'available'})
-        LOG.debug(_('restore_backup finished, backup: %(backup_id)s restored'
-                    ' to volume: %(volume_id)s') % locals())
+        LOG.info(_('restore_backup finished, backup: %(backup_id)s restored'
+                   ' to volume: %(volume_id)s') % locals())
 
     def delete_backup(self, context, backup_id):
         """
         Delete volume backup from configured backup service.
         """
         backup = self.db.backup_get(context, backup_id)
-        LOG.debug(_('delete_backup started, backup: %s'), backup_id)
+        LOG.info(_('delete_backup started, backup: %s'), backup_id)
         self.db.backup_update(context, backup_id, {'host': self.host})
 
         expected_status = 'deleting'
@@ -258,4 +258,4 @@ class BackupManager(manager.SchedulerDependentManager):
 
         context = context.elevated()
         self.db.backup_destroy(context, backup_id)
-        LOG.debug(_('delete_backup finished, backup %s deleted'), backup_id)
+        LOG.info(_('delete_backup finished, backup %s deleted'), backup_id)