Since db2 limitation, table will be in "reorg pending" state after some continuous alter table operations(add column, drop column). This means that the table is inaccessible for almost all operations until you perform a REORG.
When run neutron db upgrade, from 4ca36cfc898c to 157a5d299379, the alembic scripts in that range added 3 columns and dropped 1 column for table "ml2_port_bindings". That resulted in failure of table "ml2_port_bindings" in "reorg pending" state.
Same problem for downgrade migration.
environment: Openstack icehouse + DB2 10.5.
We can't restrict community developers how to operate tables and this only happen on DB2 but not other engines. So we could only test the alembic scripts on DB2 and fix it.
Reviewed: https:/ /review. openstack. org/93271 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=4a5da930e8b af1b370a6aab32f edb7f7bfb40930
Committed: https:/
Submitter: Jenkins
Branch: master
commit 4a5da930e8baf1b 370a6aab32fedb7 f7bfb40930
Author: wangbo <email address hidden>
Date: Mon May 12 15:18:03 2014 +0800
Reorg table ml2_port_bindings when db migration
For DB2, there are restrictions on table access recommended operations. publib. boulder. ibm.com/ infocenter/ db2luw/ v9/index. jsp %2Fcom. ibm.db2. udb.admin. doc%2Fdoc% 2Fc0023297. htm
after ALTER TABLE statements containing
REORG-
Table will be placed in "reorg pending" state
after some continuous alter table operations.
Need run reorg table to make the table available.
More info refer to:
http://
?topic=
Change-Id: I7fdd61bb4d636d 7a3260c0b23152f 1f3083cdcfd
Fixes: bug #1318498