Allow use of any backup backend for any volume backend

Currently if Ceph is used for Cinder volumes the only choice of
backup driver is Ceph. It should be possible to use any backup
driver for any volume type, e.g. iSCSI volumes can go to Ceph
based backup storage.

Change-Id: Ifc8a767b9030391580de6a24383bb6b87053835d
Closes-Bug: #1683715
This commit is contained in:
Vladislav Belogrudov 2017-04-18 13:15:02 +03:00
parent c88a7c4b5a
commit a7c47a0539

View File

@ -21,7 +21,8 @@ os_region_name = {{ openstack_region_name }}
enabled_backends = {{ cinder_enabled_backends|map(attribute='name')|join(',') }}
{% endif %}
{% if service_name == "cinder-backup" and enable_ceph | bool and cinder_backend_ceph | bool %}
{% if service_name == "cinder-backup" %}
{% if enable_ceph | bool and cinder_backup_driver == "ceph" %}
backup_driver = cinder.backup.drivers.ceph
backup_ceph_conf = /etc/ceph/ceph.conf
backup_ceph_user = cinder-backup
@ -30,13 +31,13 @@ backup_ceph_pool = {{ ceph_cinder_backup_pool_name }}
backup_ceph_stripe_unit = 0
backup_ceph_stripe_count = 0
restore_discard_excess_bytes = true
{% elif cinder_backup_driver == "nfs"%}
{% elif cinder_backup_driver == "nfs" %}
backup_driver = cinder.backup.drivers.nfs
backup_mount_options = {{ cinder_backup_mount_options_nfs }}
backup_mount_point_base = /var/lib/cinder/backup
backup_share = {{ cinder_backup_share }}
backup_file_size = 327680000
{% elif cinder_backup_driver == "swift"%}
{% elif enable_swift | bool and cinder_backup_driver == "swift" %}
backup_driver = cinder.backup.drivers.swift
backup_swift_url = http://{{ kolla_internal_vip_address }}:{{ swift_proxy_server_port }}/v1/AUTH_
backup_swift_auth = per_user
@ -44,6 +45,7 @@ backup_swift_auth_version = 1
backup_swift_user =
backup_swift_key =
{% endif %}
{% endif %}
osapi_volume_listen = {{ api_interface_address }}
osapi_volume_listen_port = {{ cinder_api_port }}