heat db migration fails for db2

Bug #1328045 reported by Jun Xie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Matt Riedemann

Bug Description

2014-05-23 15:58:12.914 | 2014-05-23 15:58:12.911 24434 INFO migrate.versioning.api [-] done
2014-05-23 15:58:12.918 | 2014-05-23 15:58:12.911 24434 INFO migrate.versioning.api [-] 30 -> 31...
2014-05-23 15:58:13.733 | 2014-05-23 15:58:13.730 24434 INFO migrate.versioning.api [-] done
2014-05-23 15:58:13.736 | 2014-05-23 15:58:13.730 24434 INFO migrate.versioning.api [-] 31 -> 32...
2014-05-23 15:58:15.288 | 2014-05-23 15:58:15.285 24434 INFO migrate.versioning.api [-] done
2014-05-23 15:58:15.290 | 2014-05-23 15:58:15.286 24434 INFO migrate.versioning.api [-] 32 -> 33...
2014-05-23 15:58:24.051 | 2014-05-23 15:58:24.049 24434 INFO migrate.versioning.api [-] done
2014-05-23 15:58:24.054 | 2014-05-23 15:58:24.049 24434 INFO migrate.versioning.api [-] 33 -> 34...
2014-05-23 15:58:25.560 | 2014-05-23 15:58:25.557 24434 INFO migrate.versioning.api [-] done
2014-05-23 15:58:25.562 | 2014-05-23 15:58:25.557 24434 INFO migrate.versioning.api [-] 34 -> 35...
2014-05-23 15:58:30.848 | ERROR: (ProgrammingError) ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0542N The column named "ID" cannot be a column of a primary key or unique key constraint because it can contain null values. SQLSTATE=42831 SQLCODE=-542 'ALTER TABLE event ADD CONSTRAINT event_pkey PRIMARY KEY (id)' ()

Revision history for this message
Jun Xie (junxiebj) wrote :

The event_uuid column needs to be nullable=False to work with DB2.

Changed in heat:
assignee: nobody → Jun Xie (junxiebj)
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/98733

Changed in heat:
status: New → In Progress
Changed in heat:
assignee: Jun Xie (junxiebj) → Chen Xiao (chenxiao)
Changed in heat:
assignee: Chen Xiao (chenxiao) → Jun Xie (junxiebj)
Changed in heat:
assignee: Jun Xie (junxiebj) → Matt Riedemann (mriedem)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/98733
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=94690c56a7fd54063a663b7396c803185d22b50d
Submitter: Jenkins
Branch: master

commit 94690c56a7fd54063a663b7396c803185d22b50d
Author: Matt Riedemann <email address hidden>
Date: Thu Oct 2 09:11:32 2014 -0700

    Columns needs to be non-nullable for DB2

    For DB2, we can not create constraints over nullable
    columns. This patch makes some related changes to
    035_event_uuid_to_id.py for Heat.

    Change-Id: I6d251fa503848e03603a13ecb742d4915f0f6972
    Closes-Bug: #1328045
    Co-authored-by: Matt Riedemann <email address hidden>

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-1 → 2015.1.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.