From e5d5116ac595a3c3e36907d2f2777c8915aa8acf Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Thu, 27 Sep 2018 15:21:36 -0400 Subject: [PATCH] Fix Cinder backup to use full class path Cinder no longer supports using a driver name without specifying the full class path. This patch fixes all the documentation and adds a release note for that. Change-Id: Ia31748e3abb0fca54efd5e8e74bde0440760159e Related-Change-Id: I3ada2dee1857074746b1893b82dd5f6641c6e579 --- defaults/main.yml | 6 +++--- doc/source/configure-cinder.rst | 2 +- .../notes/backup-driver-rename-ca4424a0814ee8af.yaml | 12 ++++++++++++ templates/cinder.conf.j2 | 4 ++-- 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/backup-driver-rename-ca4424a0814ee8af.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 68b1842c..e4719ec8 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -187,9 +187,9 @@ cinder_keystone_auth_type: password ## In order to enable the cinder backup you MUST set ``cinder_service_backup_program_enabled`` to "true" cinder_service_backup_program_enabled: false -# cinder_service_backup_driver: Options include 'cinder.backup.drivers.swift' or -# 'cinder.backup.drivers.ceph' -cinder_service_backup_driver: cinder.backup.drivers.swift +# cinder_service_backup_driver: Options include 'cinder.backup.drivers.swift.SwiftBackupDriver' or +# 'cinder.backup.drivers.ceph.CephBackupDriver' +cinder_service_backup_driver: cinder.backup.drivers.swift.SwiftBackupDriver # cinder_service_backup_swift_auth: Options include 'per_user' or 'single_user', we default to # 'per_user' so that backups are saved to a user's swift account. cinder_service_backup_swift_auth: per_user diff --git a/doc/source/configure-cinder.rst b/doc/source/configure-cinder.rst index f4ecb00d..3022a740 100644 --- a/doc/source/configure-cinder.rst +++ b/doc/source/configure-cinder.rst @@ -160,7 +160,7 @@ variable: .. code-block:: yaml - cinder_service_backup_driver: cinder.backup.drivers.ceph + cinder_service_backup_driver: cinder.backup.drivers.ceph.CephBackupDriver Configure the Ceph user and the pool to use for backups. The defaults are shown here: diff --git a/releasenotes/notes/backup-driver-rename-ca4424a0814ee8af.yaml b/releasenotes/notes/backup-driver-rename-ca4424a0814ee8af.yaml new file mode 100644 index 00000000..efad00f9 --- /dev/null +++ b/releasenotes/notes/backup-driver-rename-ca4424a0814ee8af.yaml @@ -0,0 +1,12 @@ +--- +upgrade: + - | + In Stein, Cinder stopped supporting configuring backup drivers without + the full class path. This means that you must now use the following + values for ``cinder_service_backup_driver``. + + * ``cinder.backup.drivers.swift.SwiftBackupDriver`` + * ``cinder.backup.drivers.ceph.CephBackupDriver`` + + If you do not make this change, the Cinder backup service will refuse + to start properly. diff --git a/templates/cinder.conf.j2 b/templates/cinder.conf.j2 index 05149037..71d5149e 100644 --- a/templates/cinder.conf.j2 +++ b/templates/cinder.conf.j2 @@ -21,7 +21,7 @@ auth_strategy = {{ cinder_auth_strategy }} backup_driver = {{ cinder_service_backup_driver }} backup_metadata_version = {{ cinder_service_backup_metadata_version }} backup_compression_algorithm = {{ cinder_service_backup_compression_algorithm }} -{% if cinder_service_backup_driver == 'cinder.backup.drivers.swift' %} +{% if cinder_service_backup_driver == 'cinder.backup.drivers.swift.SwiftBackupDriver' %} swift_catalog_info = {{ cinder_swift_catalog_info }} backup_swift_auth = {{ cinder_service_backup_swift_auth }} {% if cinder_service_backup_swift_auth == 'single_user' %} @@ -35,7 +35,7 @@ backup_swift_container = {{ cinder_service_backup_swift_container }} backup_swift_object_size = {{ cinder_service_backup_swift_object_size }} backup_swift_retry_attempts = {{ cinder_service_backup_swift_retry_attempts }} backup_swift_retry_backoff = {{ cinder_service_backup_swift_retry_backoff }} -{% elif cinder_service_backup_driver == 'cinder.backup.drivers.ceph' %} +{% elif cinder_service_backup_driver == 'cinder.backup.drivers.ceph.CephBackupDriver' %} backup_ceph_user = {{ cinder_service_backup_ceph_user }} backup_ceph_pool = {{ cinder_service_backup_ceph_pool }} {% endif %}