Merge "init_host offload to default to true"
This commit is contained in:
commit
cd03ed0c4d
@ -61,9 +61,11 @@ backup_manager_opts = [
|
||||
default='cinder.backup.drivers.swift',
|
||||
help='Driver to use for backups.',),
|
||||
cfg.BoolOpt('backup_service_inithost_offload',
|
||||
default=False,
|
||||
default=True,
|
||||
help='Offload pending backup delete during '
|
||||
'backup service startup.',),
|
||||
'backup service startup. If false, the backup service '
|
||||
'will remain down until all pending backups are '
|
||||
'deleted.',),
|
||||
]
|
||||
|
||||
# This map doesn't need to be extended in the future since it's only
|
||||
@ -192,7 +194,7 @@ class BackupManager(manager.SchedulerDependentManager):
|
||||
# from being blocked.
|
||||
self._add_to_threadpool(self.delete_backup, ctxt, backup)
|
||||
else:
|
||||
# By default, delete backups sequentially
|
||||
# Delete backups sequentially
|
||||
self.delete_backup(ctxt, backup)
|
||||
|
||||
def _detach_all_attachments(self, ctxt, volume):
|
||||
|
@ -211,6 +211,8 @@ class BackupTestCase(BaseBackupTest):
|
||||
def get_admin_context():
|
||||
return self.ctxt
|
||||
|
||||
self.override_config('backup_service_inithost_offload', False)
|
||||
|
||||
vol1_id = self._create_volume_db_entry()
|
||||
self._create_volume_attach(vol1_id)
|
||||
db.volume_update(self.ctxt, vol1_id, {'status': 'backing-up'})
|
||||
@ -276,7 +278,6 @@ class BackupTestCase(BaseBackupTest):
|
||||
def test_init_host_with_service_inithost_offload(self,
|
||||
mock_add_threadpool,
|
||||
mock_get_all_by_host):
|
||||
self.override_config('backup_service_inithost_offload', True)
|
||||
vol1_id = self._create_volume_db_entry()
|
||||
db.volume_update(self.ctxt, vol1_id, {'status': 'available'})
|
||||
backup1 = self._create_backup_db_entry(
|
||||
@ -410,6 +411,8 @@ class BackupTestCase(BaseBackupTest):
|
||||
def test_cleanup_one_deleting_backup(self):
|
||||
"""Test cleanup_one_backup for volume status 'deleting'."""
|
||||
|
||||
self.override_config('backup_service_inithost_offload', False)
|
||||
|
||||
backup = self._create_backup_db_entry(
|
||||
status=fields.BackupStatus.DELETING)
|
||||
|
||||
|
4
releasenotes/notes/bug-1570845-efdb0206718f4ca4.yaml
Normal file
4
releasenotes/notes/bug-1570845-efdb0206718f4ca4.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
upgrade:
|
||||
- The 'backup_service_inithost_offload' configuration
|
||||
option now defaults to 'True' instead of 'False'.
|
Loading…
Reference in New Issue
Block a user