From 61ec0b7354864705ce8c9fd6519eb6f2855a9f7a Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Tue, 1 Apr 2014 16:47:49 +0800 Subject: [PATCH] Removed Make_ceilometer_work_with_sqla_0.9.x.patch Change-Id: I4b9dc1a12eeece4b2bf1aaf61aace3246e805ef7 Rewritten-From: b584cc824ba085652104af84260ffd85fb46336c --- ...Make_ceilometer_work_with_sqla_0.9.x.patch | 44 ------------------- .../removes-sqla0.8-restrictions.patch | 8 ++-- trusty/debian/patches/series | 1 - 3 files changed, 5 insertions(+), 48 deletions(-) delete mode 100644 trusty/debian/patches/Make_ceilometer_work_with_sqla_0.9.x.patch diff --git a/trusty/debian/patches/Make_ceilometer_work_with_sqla_0.9.x.patch b/trusty/debian/patches/Make_ceilometer_work_with_sqla_0.9.x.patch deleted file mode 100644 index 4f115f2..0000000 --- a/trusty/debian/patches/Make_ceilometer_work_with_sqla_0.9.x.patch +++ /dev/null @@ -1,44 +0,0 @@ -Description: Make ceilometer work with sqla 0.9.x - Ceilometer's migration 028 makes some very specific assumptions about sqla - data structures and exception paths, which are not true in sqla 0.9.x. In 0.8 - you were shielded from errors on drop by sqla, but in 0.9 you get raw - exceptions from the db layer thrown all the way up, which causes a failure - condition when trying to delete the non existent alembic table. - . - We can get basically the same behavior as before by using the checkfirst=True - parameter on table definitions. This will actually ensure that we get the - table in question, and get the NoSuchTableError when we expect it. -Author: Sean Dague -Date: Mon, 10 Mar 2014 22:06:32 +0000 (-0400) -X-Git-Url: https://review.openstack.org/gitweb?p=openstack%2Fceilometer.git;a=commitdiff_plain;h=63f6d6af77d5fe7227b074ddc3e1594a424873e6 -Origin: upstream, https://review.openstack.org/#/c/79482/ -Change-Id: Ida33a3030fb03c2f3eeed9f129fcc0063a7b7c4b - -diff --git a/ceilometer/storage/sqlalchemy/migrate_repo/versions/028_alembic_migrations.py b/ceilometer/storage/sqlalchemy/migrate_repo/versions/028_alembic_migrations.py -index b527692..567620c 100644 ---- a/ceilometer/storage/sqlalchemy/migrate_repo/versions/028_alembic_migrations.py -+++ b/ceilometer/storage/sqlalchemy/migrate_repo/versions/028_alembic_migrations.py -@@ -21,7 +21,10 @@ import sqlalchemy as sa - def get_alembic_version(meta): - """Return Alembic version or None if no Alembic table exists.""" - try: -- a_ver = sa.Table('alembic_version', meta, autoload=True) -+ a_ver = sa.Table( -+ 'alembic_version', -+ meta, -+ autoload=True) - return sa.select([a_ver.c.version_num]).scalar() - except sa.exc.NoSuchTableError: - return None -@@ -29,7 +32,10 @@ def get_alembic_version(meta): - - def delete_alembic(meta): - try: -- sa.Table('alembic_version', meta, autoload=True).drop() -+ sa.Table( -+ 'alembic_version', -+ meta, -+ autoload=True).drop(checkfirst=True) - except sa.exc.NoSuchTableError: - pass - diff --git a/trusty/debian/patches/removes-sqla0.8-restrictions.patch b/trusty/debian/patches/removes-sqla0.8-restrictions.patch index cd4c50b..9f75286 100644 --- a/trusty/debian/patches/removes-sqla0.8-restrictions.patch +++ b/trusty/debian/patches/removes-sqla0.8-restrictions.patch @@ -3,9 +3,11 @@ Author: Thomas Goirand Forwarded: not-needed Last-Update: 2014-03-14 ---- ceilometer-2014.1~b3.orig/requirements.txt -+++ ceilometer-2014.1~b3/requirements.txt -@@ -26,7 +26,7 @@ pytz>=2010h +Index: ceilometer/requirements.txt +=================================================================== +--- ceilometer.orig/requirements.txt 2014-04-01 16:37:51.000000000 +0800 ++++ ceilometer/requirements.txt 2014-04-01 16:46:54.000000000 +0800 +@@ -27,7 +27,7 @@ PyYAML>=3.1.0 requests>=1.1 six>=1.5.2 diff --git a/trusty/debian/patches/series b/trusty/debian/patches/series index 37f3197..970683f 100644 --- a/trusty/debian/patches/series +++ b/trusty/debian/patches/series @@ -1,2 +1 @@ removes-sqla0.8-restrictions.patch -Make_ceilometer_work_with_sqla_0.9.x.patch -- 2.32.3