blob: d7c977e1e356d54d895fb607352a7f089ff5f68e [file] [log] [blame]
Hironori Shiina01a84d22021-01-11 13:42:46 -05001#!/bin/bash
2#
3# lib/cinder_backups/swift
4# Configure the swift backup driver
5
6# Enable with:
7#
8# CINDER_BACKUP_DRIVER=swift
9
10# Dependencies:
11#
12# - ``functions`` file
13# - ``cinder`` configurations
14
15# Save trace setting
16_XTRACE_CINDER_SWIFT=$(set +o | grep xtrace)
17set +o xtrace
18
19
20function configure_cinder_backup_swift {
21 # NOTE(mriedem): The default backup driver uses swift and if we're
22 # on a subnode we might not know if swift is enabled, but chances are
23 # good that it is on the controller so configure the backup service
24 # to use it.
25 iniset $CINDER_CONF DEFAULT backup_driver "cinder.backup.drivers.swift.SwiftBackupDriver"
26 iniset $CINDER_CONF DEFAULT backup_swift_url "$SWIFT_SERVICE_PROTOCOL://$SERVICE_HOST:$SWIFT_DEFAULT_BIND_PORT/v1/AUTH_"
27}
28
29# init_cinder_backup_swift: nothing to do
30# cleanup_cinder_backup_swift: nothing to do
31
32
33# Restore xtrace
34$_XTRACE_CINDER_SWIFT
35
36# Local variables:
37# mode: shell-script
38# End: