diff options
author | Vu Tran <vu.tran@windriver.com> | 2014-04-09 19:59:24 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-04-11 14:15:28 -0400 |
commit | 998b51ee74330db79c27e437b224b0485c64c566 (patch) | |
tree | 4b0ad0f2828088d2918037ea2414e2982295fdbb /meta-openstack | |
parent | a403d7493d31578626f0df88c800c9fb734b0ed9 (diff) | |
download | meta-cloud-services-998b51ee74330db79c27e437b224b0485c64c566.tar.gz |
cinder-backup: enable swift backend
Modify cinder config file allows cinder-backup
to be able to use swift as backend for
storing cinder backup volume on Swift cluster.
Also add variable CINDER_BACKUP_BACKEND_DRIVER
which allows setting default cinder backup backend
driver. Right now set it to Swift.
Signed-off-by: Vu Tran <vu.tran@windriver.com>
Diffstat (limited to 'meta-openstack')
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-cinder/cinder.conf | 21 | ||||
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-cinder_git.bb | 3 |
2 files changed, 23 insertions, 1 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder/cinder.conf b/meta-openstack/recipes-devtools/python/python-cinder/cinder.conf index 99a0fc7..24bbc23 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder/cinder.conf +++ b/meta-openstack/recipes-devtools/python/python-cinder/cinder.conf | |||
@@ -1171,7 +1171,12 @@ rabbit_port=5672 | |||
1171 | # Backup backend options | 1171 | # Backup backend options |
1172 | # | 1172 | # |
1173 | 1173 | ||
1174 | backup_driver=cinder.backup.drivers.ceph | 1174 | backup_driver=%CINDER_BACKUP_BACKEND_DRIVER% |
1175 | |||
1176 | # | ||
1177 | # Ceph backup backend options | ||
1178 | # | ||
1179 | |||
1175 | backup_ceph_conf=/etc/ceph/ceph.conf | 1180 | backup_ceph_conf=/etc/ceph/ceph.conf |
1176 | backup_ceph_user=cinder-backup | 1181 | backup_ceph_user=cinder-backup |
1177 | backup_ceph_chunk_size=134217728 | 1182 | backup_ceph_chunk_size=134217728 |
@@ -1181,6 +1186,20 @@ backup_ceph_stripe_count=0 | |||
1181 | restore_discard_excess_bytes=true | 1186 | restore_discard_excess_bytes=true |
1182 | 1187 | ||
1183 | # | 1188 | # |
1189 | # Swift backup backend options | ||
1190 | # | ||
1191 | |||
1192 | backup_swift_url=http://controller:8888/v1/AUTH_ | ||
1193 | backup_swift_auth=per_user | ||
1194 | #backup_swift_user=<None> | ||
1195 | #backup_swift_key=<None> | ||
1196 | backup_swift_container=cinder-backups | ||
1197 | backup_swift_object_size=52428800 | ||
1198 | backup_swift_retry_attempts=3 | ||
1199 | backup_swift_retry_backoff=2 | ||
1200 | backup_compression_algorithm=zlib | ||
1201 | |||
1202 | # | ||
1184 | # Multi backend options | 1203 | # Multi backend options |
1185 | # | 1204 | # |
1186 | 1205 | ||
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb index 28b0f74..237377d 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb +++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb | |||
@@ -25,6 +25,8 @@ S = "${WORKDIR}/git" | |||
25 | 25 | ||
26 | inherit setuptools update-rc.d identity default_configs | 26 | inherit setuptools update-rc.d identity default_configs |
27 | 27 | ||
28 | CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift" | ||
29 | |||
28 | do_install_append() { | 30 | do_install_append() { |
29 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} | 31 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} |
30 | CINDER_CONF_DIR=${D}${sysconfdir}/${SRCNAME} | 32 | CINDER_CONF_DIR=${D}${sysconfdir}/${SRCNAME} |
@@ -37,6 +39,7 @@ do_install_append() { | |||
37 | 39 | ||
38 | sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/cinder.conf | 40 | sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/cinder.conf |
39 | sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/cinder.conf | 41 | sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/cinder.conf |
42 | sed -e "s:%CINDER_BACKUP_BACKEND_DRIVER%:${CINDER_BACKUP_BACKEND_DRIVER}:g" -i ${WORKDIR}/cinder.conf | ||
40 | 43 | ||
41 | install -d ${CINDER_CONF_DIR} | 44 | install -d ${CINDER_CONF_DIR} |
42 | install -m 600 ${WORKDIR}/cinder.conf ${CINDER_CONF_DIR}/ | 45 | install -m 600 ${WORKDIR}/cinder.conf ${CINDER_CONF_DIR}/ |