DB2 column 'id' autoincrement issue

Bug #1316041 reported by Chen Xiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Matt Riedemann

Bug Description

When using DB2, Heat event record can not be inserted into table "Event", the root cause is that the ID column is supposed to be auto increasement but it is not. This column was set to auto increasement in 035_event_uuid_to_id.py with the statement:
event_table.c.tmp_id.alter(sqlalchemy.Integer, autoincrement=True)
For DB2, setting "ID" colume "autoincrement=True" can't make sense after above "tmp_id=>id" transformation,
so should work around it.

reproduce steps:
Using DB2 as heat database backend.

[root@control-node ~]# heat create wordpress1 --template-file=heat-templates/cfn/F17/getting_started.template --parameters="KeyName=root_key"
 Will found it will try to insert null value to column 'id' in table 'event'.

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

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

commit a4336ae1ae3cdade866da06a3eb435d02c7b12f2
Author: Chen Xiao <email address hidden>
Date: Mon Jun 16 18:36:08 2014 +0800

    Fix DB2 column 'id' autoincrement issue

    After installing heat against DB2, we can't insert data in table
    event, the reason is that "event_table.c.tmp_id.alter(
    sqlalchemy.Integer, autoincrement=True)" can't make sense after
    above "tmp_id=>id" transformation, Now need work around it.

    Change-Id: I50025fc5db87d458e660d42c773d799fc36f1b27
    Closes-Bug: #1316041

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.