[openstack-glance/el6] fix the essex port of Support-DB-auto-create-suppression.patch
Pádraig Brady
pbrady at fedoraproject.org
Tue May 22 01:51:10 UTC 2012
commit cd136a248de6ee858adb6fbf95fa216fa6395dca
Author: Pádraig Brady <P at draigBrady.com>
Date: Tue May 22 01:46:16 2012 +0100
fix the essex port of Support-DB-auto-create-suppression.patch
cfg.py in the glance essex branch doesn't support __contains__,
i.e. the 'in' keyword and so glance-manage db_sync fails.
Duplicate option registration is ignored within cfg.py
anyway so remove this redundant code.
(cherry picked from commit 04df8e76855f4112cf824817017ca3512466fc8e)
Conflicts:
openstack-glance.spec
0007-Support-DB-auto-create-suppression.patch | 22 +++++-----------------
openstack-glance.spec | 5 ++++-
2 files changed, 9 insertions(+), 18 deletions(-)
---
diff --git a/0007-Support-DB-auto-create-suppression.patch b/0007-Support-DB-auto-create-suppression.patch
index 8aec148..1cf7945 100644
--- a/0007-Support-DB-auto-create-suppression.patch
+++ b/0007-Support-DB-auto-create-suppression.patch
@@ -1,4 +1,4 @@
-From f4372facffb42c5c1e02e51a4a2b34edac08cbca Mon Sep 17 00:00:00 2001
+From 9d152280184780f8d7eb547c9b08fabd196cf19d Mon Sep 17 00:00:00 2001
From: Eoghan Glynn <eglynn at redhat.com>
Date: Fri, 18 May 2012 14:23:41 +0100
Subject: [PATCH] Support DB auto-create suppression.
@@ -28,14 +28,14 @@ Conflicts:
glance/tests/functional/v2/test_images.py
---
bin/glance-manage | 10 +-
- glance/registry/db/api.py | 24 +-
+ glance/registry/db/api.py | 19 +-
glance/tests/functional/__init__.py | 58 +-
glance/tests/functional/test_bin_glance.py | 3 -
glance/tests/functional/test_glance_manage.py | 77 ++
glance/tests/functional/test_sqlite.py | 1 -
glance/tests/functional/v1/test_api.py | 1357 +++++++++++++++++++++++++
glance/tests/functional/v2/test_images.py | 468 +++++++++
- 8 files changed, 1958 insertions(+), 40 deletions(-)
+ 8 files changed, 1954 insertions(+), 39 deletions(-)
create mode 100644 glance/tests/functional/test_glance_manage.py
create mode 100644 glance/tests/functional/v1/test_api.py
create mode 100644 glance/tests/functional/v2/test_images.py
@@ -69,7 +69,7 @@ index 3a50c11..aeee4fd 100755
current_version = args.pop(0) if args else None
glance.registry.db.migration.db_sync(conf, version, current_version)
diff --git a/glance/registry/db/api.py b/glance/registry/db/api.py
-index 04fe2e5..9e78725 100644
+index 04fe2e5..608b435 100644
--- a/glance/registry/db/api.py
+++ b/glance/registry/db/api.py
@@ -68,7 +68,8 @@ db_opts = [
@@ -82,19 +82,7 @@ index 04fe2e5..9e78725 100644
]
-@@ -102,7 +103,10 @@ def configure_db(conf):
- """
- global _ENGINE, sa_logger, logger, _MAX_RETRIES, _RETRY_INTERVAL
- if not _ENGINE:
-- conf.register_opts(db_opts)
-+ for opt in db_opts:
-+ # avoid duplicate registration
-+ if not opt.name in conf:
-+ conf.register_opt(opt)
- sql_connection = conf.sql_connection
- _MAX_RETRIES = conf.sql_max_retries
- _RETRY_INTERVAL = conf.sql_retry_interval
-@@ -131,12 +135,16 @@ def configure_db(conf):
+@@ -131,12 +132,16 @@ def configure_db(conf):
elif conf.verbose:
sa_logger.setLevel(logging.INFO)
diff --git a/openstack-glance.spec b/openstack-glance.spec
index 298d02b..2a931f2 100644
--- a/openstack-glance.spec
+++ b/openstack-glance.spec
@@ -1,6 +1,6 @@
Name: openstack-glance
Version: 2012.1
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: OpenStack Image Service
Group: Applications/System
@@ -230,6 +230,9 @@ fi
%doc doc/build/html
%changelog
+* Tue May 22 2012 Pádraig Brady <P at draigBrady.com> - 2012.1-9
+- Fix an issue with glance-manage db_sync (#823702)
+
* Mon May 21 2012 Pádraig Brady <P at draigBrady.com> - 2012.1-8
- Sync with essex stable
- Don't auto create database on service start
More information about the scm-commits
mailing list