sql migration failed on db2

Bug #1443252 reported by Ethan Lynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Ethan Lynn
Kilo
Fix Released
Medium
Unassigned

Bug Description

2015-04-09 08:14:33.522 | 2015-04-09 16:14:33.521 1576 ERROR oslo_db.sqlalchemy.exc_filters [-] DBAPIError exception wrapped from (ProgrammingError) ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0190N ALTER TABLE "DB2INST2.STACK" specified attributes for column "STATUS_REASON" that are not compatible with the existing column. SQLSTATE=42837 SQLCODE=-190 '\nALTER TABLE stack ALTER COLUMN status_reason SET DATA TYPE CLOB' ()
2015-04-09 08:14:33.522 | 2015-04-09 16:14:33.521 1576 TRACE oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2015-04-09 08:14:33.522 | 2015-04-09 16:14:33.521 1576 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
2015-04-09 08:14:33.522 | 2015-04-09 16:14:33.521 1576 TRACE oslo_db.sqlalchemy.exc_filters context)
2015-04-09 08:14:33.523 | 2015-04-09 16:14:33.521 1576 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/ibm_db_sa-0.3.2-py2.7.egg/ibm_db_sa/ibm_db.py", line 106, in do_execute
2015-04-09 08:14:33.523 | 2015-04-09 16:14:33.521 1576 TRACE oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2015-04-09 08:14:33.523 | 2015-04-09 16:14:33.521 1576 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/ibm_db_dbi.py", line 1332, in execute
2015-04-09 08:14:33.523 | 2015-04-09 16:14:33.521 1576 TRACE oslo_db.sqlalchemy.exc_filters self._execute_helper(parameters)
2015-04-09 08:14:33.523 | 2015-04-09 16:14:33.521 1576 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/ibm_db_dbi.py", line 1244, in _execute_helper
2015-04-09 08:14:33.523 | 2015-04-09 16:14:33.521 1576 TRACE oslo_db.sqlalchemy.exc_filters raise self.messages[len(self.messages) - 1]
2015-04-09 08:14:33.523 | 2015-04-09 16:14:33.521 1576 TRACE oslo_db.sqlalchemy.exc_filters ProgrammingError: ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0190N ALTER TABLE "DB2INST2.STACK" specified attributes for column "STATUS_REASON" that are not compatible with the existing column. SQLSTATE=42837 SQLCODE=-190
2015-04-09 08:14:33.523 | 2015-04-09 16:14:33.521 1576 TRACE oslo_db.sqlalchemy.exc_filters
2015-04-09 08:14:33.524 | 2015-04-09 16:14:33.523 1576 WARNING migrate.changeset.databases.ibmdb2 [-] Unable to change the column type. Error: (ProgrammingError) ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0190N ALTER TABLE "DB2INST2.STACK" specified attributes for column "STATUS_REASON" that are not compatible with the existing column. SQLSTATE=42837 SQLCODE=-190 '\nALTER TABLE stack ALTER COLUMN status_reason SET DATA TYPE CLOB' ()
2015-04-09 08:14:35.939 | 2015-04-09 16:14:35.938 1576 ERROR oslo_db.sqlalchemy.exc_filters [-] DBAPIError exception wrapped from (ProgrammingError) ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0190N ALTER TABLE "DB2INST2.RESOURCE" specified attributes for column "STATUS_REASON" that are not compatible with the existing column. SQLSTATE=42837 SQLCODE=-190 '\nALTER TABLE resource ALTER COLUMN status_reason SET DATA TYPE CLOB' ()
2015-04-09 08:14:35.939 | 2015-04-09 16:14:35.938 1576 TRACE oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2015-04-09 08:14:35.939 | 2015-04-09 16:14:35.938 1576 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
2015-04-09 08:14:35.939 | 2015-04-09 16:14:35.938 1576 TRACE oslo_db.sqlalchemy.exc_filters context)
2015-04-09 08:14:35.939 | 2015-04-09 16:14:35.938 1576 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/ibm_db_sa-0.3.2-py2.7.egg/ibm_db_sa/ibm_db.py", line 106, in do_execute
2015-04-09 08:14:35.939 | 2015-04-09 16:14:35.938 1576 TRACE oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2015-04-09 08:14:35.939 | 2015-04-09 16:14:35.938 1576 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/ibm_db_dbi.py", line 1332, in execute
2015-04-09 08:14:35.940 | 2015-04-09 16:14:35.938 1576 TRACE oslo_db.sqlalchemy.exc_filters self._execute_helper(parameters)
2015-04-09 08:14:35.940 | 2015-04-09 16:14:35.938 1576 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/ibm_db_dbi.py", line 1244, in _execute_helper
2015-04-09 08:14:35.940 | 2015-04-09 16:14:35.938 1576 TRACE oslo_db.sqlalchemy.exc_filters raise self.messages[len(self.messages) - 1]
2015-04-09 08:14:35.940 | 2015-04-09 16:14:35.938 1576 TRACE oslo_db.sqlalchemy.exc_filters ProgrammingError: ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0190N ALTER TABLE "DB2INST2.RESOURCE" specified attributes for column "STATUS_REASON" that are not compatible with the existing column. SQLSTATE=42837 SQLCODE=-190
2015-04-09 08:14:35.940 | 2015-04-09 16:14:35.938 1576 TRACE oslo_db.sqlalchemy.exc_filters
2015-04-09 08:14:35.940 | 2015-04-09 16:14:35.940 1576 WARNING migrate.changeset.databases.ibmdb2 [-] Unable to change the column type. Error: (ProgrammingError) ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0190N ALTER TABLE "DB2INST2.RESOURCE" specified attributes for column "STATUS_REASON" that are not compatible with the existing column. SQLSTATE=42837 SQLCODE=-190 '\nALTER TABLE resource ALTER COLUMN status_reason SET DATA TYPE CLOB' ()
2015-04-09 08:14:38.069 | 2015-04-09 16:14:38.068 1576 ERROR oslo_db.sqlalchemy.exc_filters [-] DBAPIError exception wrapped from (ProgrammingError) ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0190N ALTER TABLE "DB2INST2.SOFTWARE_DEPLOYMENT" specified attributes for column "STATUS_REASON" that are not compatible with the existing column. SQLSTATE=42837 SQLCODE=-190 '\nALTER TABLE software_deployment ALTER COLUMN status_reason SET DATA TYPE CLOB' ()
2015-04-09 08:14:38.069 | 2015-04-09 16:14:38.068 1576 TRACE oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2015-04-09 08:14:38.070 | 2015-04-09 16:14:38.068 1576 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
2015-04-09 08:14:38.070 | 2015-04-09 16:14:38.068 1576 TRACE oslo_db.sqlalchemy.exc_filters context)
2015-04-09 08:14:38.070 | 2015-04-09 16:14:38.068 1576 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/ibm_db_sa-0.3.2-py2.7.egg/ibm_db_sa/ibm_db.py", line 106, in do_execute
2015-04-09 08:14:38.070 | 2015-04-09 16:14:38.068 1576 TRACE oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2015-04-09 08:14:38.070 | 2015-04-09 16:14:38.068 1576 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/ibm_db_dbi.py", line 1332, in execute
2015-04-09 08:14:38.070 | 2015-04-09 16:14:38.068 1576 TRACE oslo_db.sqlalchemy.exc_filters self._execute_helper(parameters)
2015-04-09 08:14:38.070 | 2015-04-09 16:14:38.068 1576 TRACE oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/ibm_db_dbi.py", line 1244, in _execute_helper
2015-04-09 08:14:38.070 | 2015-04-09 16:14:38.068 1576 TRACE oslo_db.sqlalchemy.exc_filters raise self.messages[len(self.messages) - 1]
2015-04-09 08:14:38.071 | 2015-04-09 16:14:38.068 1576 TRACE oslo_db.sqlalchemy.exc_filters ProgrammingError: ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0190N ALTER TABLE "DB2INST2.SOFTWARE_DEPLOYMENT" specified attributes for column "STATUS_REASON" that are not compatible with the existing column. SQLSTATE=42837 SQLCODE=-190
2015-04-09 08:14:38.071 | 2015-04-09 16:14:38.068 1576 TRACE oslo_db.sqlalchemy.exc_filters
2015-04-09 08:14:38.072 | 2015-04-09 16:14:38.071 1576 WARNING migrate.changeset.databases.ibmdb2 [-] Unable to change the column type. Error: (ProgrammingError) ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0190N ALTER TABLE "DB2INST2.SOFTWARE_DEPLOYMENT" specified attributes for column "STATUS_REASON" that are not compatible with the existing column. SQLSTATE=42837 SQLCODE=-190 '\nALTER TABLE software_deployment ALTER COLUMN status_reason SET DATA TYPE CLOB' ()

In db2, data type change not alter from non-lob to lob.
http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000888.html?cp=SSEPGG_9.7.0%2F2-10-6-26

Revision history for this message
Ethan Lynn (ethanlynn) wrote :
Ethan Lynn (ethanlynn)
Changed in heat:
assignee: nobody → Ethan Lynn (ethanlynn)
Ethan Lynn (ethanlynn)
tags: added: kilo-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/172877

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (proposed/kilo)

Fix proposed to branch: proposed/kilo
Review: https://review.openstack.org/173152

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/172877
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=7b25a9d6471a1a2d2d6441f7385d6d2bd00537ea
Submitter: Jenkins
Branch: master

commit 7b25a9d6471a1a2d2d6441f7385d6d2bd00537ea
Author: Ethan Lynn <email address hidden>
Date: Mon Apr 13 18:43:53 2015 +0800

    Fix sqlalchemy migration script 061 for DB2 backend

    DB2 doesn't support alter column type from string to text,
    need to add a new column and copy data from old column, and
    later remove the old column.

    Closes-Bug: #1443252
    Change-Id: I7b3edf6bf7ea0efaf96398a83dad9ebe61caaa23

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/174048

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (proposed/kilo)

Change abandoned by Doug Hellmann (<email address hidden>) on branch: proposed/kilo
Review: https://review.openstack.org/173152
Reason: replaced by https://review.openstack.org/174048 after we shuffled branches

Angus Salkeld (asalkeld)
Changed in heat:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/kilo)

Reviewed: https://review.openstack.org/174048
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=f82376800f1e6b51d4c8f5a4f35034ecb8199c06
Submitter: Jenkins
Branch: stable/kilo

commit f82376800f1e6b51d4c8f5a4f35034ecb8199c06
Author: Ethan Lynn <email address hidden>
Date: Mon Apr 13 18:43:53 2015 +0800

    Fix sqlalchemy migration script 061 for DB2 backend

    DB2 doesn't support alter column type from string to text,
    need to add a new column and copy data from old column, and
    later remove the old column.

    Closes-Bug: #1443252
    Change-Id: I7b3edf6bf7ea0efaf96398a83dad9ebe61caaa23
    (cherry picked from commit 7b25a9d6471a1a2d2d6441f7385d6d2bd00537ea)

Thierry Carrez (ttx)
tags: removed: kilo-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/179291

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)
Download full text (7.7 KiB)

Reviewed: https://review.openstack.org/179291
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=5d725ecd09a35e3d5fb042956c4ecebb309c0a41
Submitter: Jenkins
Branch: master

commit b5c32027e5f207cca51796ee2aba346413ad48da
Author: Steven Hardy <email address hidden>
Date: Thu Apr 23 14:14:26 2015 +1000

    Fix ResourceGroup validate when there are removal_policies

    We can't call child_template() from a validate in ResourceGroup
    as it accesses nested(). So move the validation to validate_nested_stack()
    so we can control the test template used for validation.

    Unfortunately coverage for this got removed during recent test rework
    and it looks like the interface has got broken.

    Co-Authored-by: Angus Salkeld <email address hidden>
    Change-Id: Ibea738a343847736b041cc49a2c486fa71e562d9
    Closes-Bug: #1446861

commit c958ecb5b4b4fc5a0236b70c21d7d62864cd162b
Author: Ethan Lynn <email address hidden>
Date: Wed Apr 22 13:46:11 2015 +0800

    Fix unicodeerror when heat-engine start

    If change local language to other languages(like ja), heat-engine
    will failed to start.

    Closes-Bug: #1446958
    Change-Id: Ia3cbcebb86257bc1c52ea758c1583191e5a52a2d
    (cherry picked from commit 0b3dd7be3d3cd9842616a16843d03e6c13cdcb08)

commit 94c4ae56e0fece995659d718ed1ab6e56b2deb9f
Author: Ethan Lynn <email address hidden>
Date: Tue Apr 21 17:09:42 2015 +0800

    Add v6-fixed-ip support for nova server

    Now nova server fixed-ip only support ipv4 address,
    this patch add IPv6 fixed ip support for nova server.

    Closes-Bug: #1446532
    Change-Id: I647abeedd36352f053a043d00ab87a84ee2470f3
    (cherry picked from commit 3e1a6f3b826bbc2a638ed7ea239221d13678024c)

commit d07f91615a159663261091e672ce62f90e6ad607
Author: Angus Salkeld <email address hidden>
Date: Tue Apr 7 09:25:50 2015 +1000

    Persist parent_resource_name and make sure it's available

    We are persisting for a number of reasons:
    - so we don't have to pass this through ever rpc call
    - the API exposes parent_resource (currently always None as
      it is not persisted)

    Closes-bug: #1438978
    Change-Id: Id2db36c0234a085ec4f0ce2ab114ec483ea29d81
    (cherry picked from commit edf86aeac2f7b68243b0eccc3c49fa1a579e664b)

commit f944c86d4c26877f4d8dab56790815af8e83ba45
Author: Michal Rostecki <email address hidden>
Date: Wed Mar 25 06:47:33 2015 +0100

    Novaclient v2 instead of v1_1

    Nova API v1.1 is now deprecated and causes warnings.

    Change-Id: Ib4b57a308b7637f4015a07b4e888ccd6347cb947
    Closes-Bug: #1437158
    (cherry picked from commit d9d68cf52bd7027e7d1cafd023a399c2a342b2c5)

commit 370f3c98c5eccf8bce1be425acc31af5e7224171
Author: Zane Bitter <email address hidden>
Date: Thu Apr 16 17:20:05 2015 -0400

    Don't re-bind environment for get_file during stack update

    While we're in the process of updating a stack, we set the stack's
    environment to the new, updated values. However, we don't want to change
    existing resources' idea of their own values until we have explivitly done
    an update of them to bring them into line with th...

Read more...

Thierry Carrez (ttx)
Changed in heat:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-1 → 5.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.