summaryrefslogtreecommitdiffstats
path: root/meta-openstack
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2014-05-07 00:14:10 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-05-07 00:14:10 -0400
commit7b1c8e1d5d37ce4a88ca90ff949fe86ff0d45315 (patch)
tree1bf84f236fa4f8d6645f99e11a85f11d7da48406 /meta-openstack
parent3e625d7fc1342a4c02d7d5c6e7797fe89fce5983 (diff)
downloadmeta-cloud-services-7b1c8e1d5d37ce4a88ca90ff949fe86ff0d45315.tar.gz
glance: update to stable/icehouse
Updating glance to the icehouse release. Changes include: - patch glance to not load ALL backend modules, only the ones defined in the glance configuration. Without this patch, we must have support for all backends, even if we don't use them. To avoid including support for unused backends .. we prefer to only load used ones. - Add a variable GLANCE_KNOWN_STORES to the recipe, which will be copied into the glance configuration to enable the loading of supported options (as modifed by the first patch). - Change "sql_connection" to the new "connection" directive - Change the "notifier_strategy" to the new "notification_driver" Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack')
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance/0001-glance-store-only-load-known-stores-not-all-stores.patch30
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance_git.bb21
2 files changed, 46 insertions, 5 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-glance/0001-glance-store-only-load-known-stores-not-all-stores.patch b/meta-openstack/recipes-devtools/python/python-glance/0001-glance-store-only-load-known-stores-not-all-stores.patch
new file mode 100644
index 0000000..080f6ed
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-glance/0001-glance-store-only-load-known-stores-not-all-stores.patch
@@ -0,0 +1,30 @@
1From 929b981a5970082980dcda7ad531ab7f2fb71577 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Wed, 30 Apr 2014 23:54:30 -0400
4Subject: [PATCH] glance/store: only load known stores, not all stores
5
6To avoid the import of modules and support for unnecessary storage options,
7we only load the store modules that are specified as known_stores in the
8glance-api.conf.
9
10Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
11---
12 glance/store/__init__.py | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/glance/store/__init__.py b/glance/store/__init__.py
16index 33a67d626d37..0fdedcfe3c86 100644
17--- a/glance/store/__init__.py
18+++ b/glance/store/__init__.py
19@@ -181,7 +181,7 @@ def create_stores():
20 """
21 store_count = 0
22 store_classes = set()
23- for store_entry in set(CONF.known_stores + _ALL_STORES):
24+ for store_entry in set(CONF.known_stores):
25 store_entry = store_entry.strip()
26 if not store_entry:
27 continue
28--
291.7.10.4
30
diff --git a/meta-openstack/recipes-devtools/python/python-glance_git.bb b/meta-openstack/recipes-devtools/python/python-glance_git.bb
index d2f5f21..54aaca2 100644
--- a/meta-openstack/recipes-devtools/python/python-glance_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-glance_git.bb
@@ -7,18 +7,25 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
7PR = "r0" 7PR = "r0"
8SRCNAME = "glance" 8SRCNAME = "glance"
9 9
10SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ 10SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/icehouse \
11 file://0001-glance-store-only-load-known-stores-not-all-stores.patch \
11 file://glance.init \ 12 file://glance.init \
12 " 13 "
13 14
14SRCREV="1690a739cd94efe6cb2af8e794a4acdf59de54cd" 15SRCREV="556eebb7780b55af87c0fe49b76593f833ea189a"
15PV="2013.2.2+git${SRCPV}" 16PV="2014.1+git${SRCPV}"
16 17
17S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
18 19
19inherit setuptools update-rc.d identity default_configs 20inherit setuptools update-rc.d identity default_configs
20 21
21GLANCE_DEFAULT_STORE ?= "file" 22GLANCE_DEFAULT_STORE ?= "file"
23GLANCE_KNOWN_STORES ?= "glance.store.rbd.Store,\
24 glance.store.swift.Store,\
25 glance.store.cinder.Store,\
26 glance.store.filesystem.Store,\
27 glance.store.http.Store"
28
22 29
23do_install_append() { 30do_install_append() {
24 TEMPLATE_CONF_DIR=${S}${sysconfdir} 31 TEMPLATE_CONF_DIR=${S}${sysconfdir}
@@ -31,14 +38,14 @@ do_install_append() {
31 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/glance-$file.conf 38 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/glance-$file.conf
32 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ 39 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
33 -i ${WORKDIR}/glance-$file.conf 40 -i ${WORKDIR}/glance-$file.conf
34 sed -e "s#^sql_conn.*#sql_connection = postgresql://${DB_USER}:${DB_PASSWORD}@localhost/glance#g" \ 41 sed -e "s!^#connection =.*!connection = postgresql://${DB_USER}:${DB_PASSWORD}@localhost/glance!g" \
35 -i ${WORKDIR}/glance-$file.conf 42 -i ${WORKDIR}/glance-$file.conf
36 done 43 done
37 sed -e "s:^filesystem_store_datadir =.*:filesystem_store_datadir = ${sysconfdir}/${SRCNAME}/images/:g" \ 44 sed -e "s:^filesystem_store_datadir =.*:filesystem_store_datadir = ${sysconfdir}/${SRCNAME}/images/:g" \
38 -i ${WORKDIR}/glance-api.conf 45 -i ${WORKDIR}/glance-api.conf
39 46
40 # send samples to rabbitmq for ceilometer integration 47 # send samples to rabbitmq for ceilometer integration
41 sed -e "s:^notifier_strategy = noop:notifier_strategy = rabbit:g" \ 48 sed -e "s:^# notification_driver = noop:notification_driver = rabbit:g" \
42 -i ${WORKDIR}/glance-api.conf 49 -i ${WORKDIR}/glance-api.conf
43 50
44 sed 's:^default_store =.*:default_store = ${GLANCE_DEFAULT_STORE}:g' -i ${WORKDIR}/glance-api.conf 51 sed 's:^default_store =.*:default_store = ${GLANCE_DEFAULT_STORE}:g' -i ${WORKDIR}/glance-api.conf
@@ -47,6 +54,9 @@ do_install_append() {
47 sed 's:^swift_store_key =.*:swift_store_key = ${SERVICE_PASSWORD}:g' -i ${WORKDIR}/glance-api.conf 54 sed 's:^swift_store_key =.*:swift_store_key = ${SERVICE_PASSWORD}:g' -i ${WORKDIR}/glance-api.conf
48 sed 's:^swift_store_create_container_on_put =.*:swift_store_create_container_on_put = True:g' -i ${WORKDIR}/glance-api.conf 55 sed 's:^swift_store_create_container_on_put =.*:swift_store_create_container_on_put = True:g' -i ${WORKDIR}/glance-api.conf
49 56
57 # multi line match, replace the known stores with the ones we support.
58 sed '1!N; s:#known_stores = glance.store.*\n.*#.*glance.store.http.*:known_stores = ${GLANCE_KNOWN_STORES}:g' -i ${WORKDIR}/glance-api.conf
59
50 install -d ${GLANCE_CONF_DIR} 60 install -d ${GLANCE_CONF_DIR}
51 install -m 600 ${WORKDIR}/glance-registry.conf ${GLANCE_CONF_DIR}/ 61 install -m 600 ${WORKDIR}/glance-registry.conf ${GLANCE_CONF_DIR}/
52 install -m 600 ${WORKDIR}/glance-api.conf ${GLANCE_CONF_DIR}/ 62 install -m 600 ${WORKDIR}/glance-api.conf ${GLANCE_CONF_DIR}/
@@ -55,6 +65,7 @@ do_install_append() {
55 install -m 600 ${S}/etc/glance-registry-paste.ini ${GLANCE_CONF_DIR}/ 65 install -m 600 ${S}/etc/glance-registry-paste.ini ${GLANCE_CONF_DIR}/
56 install -m 600 ${S}/etc/glance-api-paste.ini ${GLANCE_CONF_DIR}/ 66 install -m 600 ${S}/etc/glance-api-paste.ini ${GLANCE_CONF_DIR}/
57 install -m 600 ${S}/etc/policy.json ${GLANCE_CONF_DIR}/ 67 install -m 600 ${S}/etc/policy.json ${GLANCE_CONF_DIR}/
68 install -m 600 ${S}/etc/schema-image.json ${GLANCE_CONF_DIR}/
58 69
59 install -d ${GLANCE_CONF_DIR}/images 70 install -d ${GLANCE_CONF_DIR}/images
60 install -d ${D}${localstatedir}/lib/glance/image_cache 71 install -d ${D}${localstatedir}/lib/glance/image_cache