Migration with alter_column function reset nullable parameter for columns

Bug #1288681 reported by Ann Taraday
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Ann Taraday

Bug Description

Migrations 338d7508968c_vpnaas_peer_address_.py and abc88c33f74f_lb_stats_needs_bigint.py correct columns' length and types, but nullable=False parameter is lost after its upgrade() :

mysql> explain ipsec_site_connections;
+----------------+-------------------------------------------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+-------------------------------------------------------------+------+-----+---------+-------+
| tenant_id | varchar(255) | YES | | NULL | |
| id | varchar(36) | NO | PRI | NULL | |
| name | varchar(255) | YES | | NULL | |
| description | varchar(255) | YES | | NULL | |
| peer_address | varchar(255) | YES | | NULL | |
| peer_id | varchar(255) | NO | | NULL | |
| route_mode | varchar(8) | NO | | NULL | |
| mtu | int(11) | NO | | NULL | |
| initiator | enum('bi-directional','response-only') | NO | | NULL | |
| auth_mode | varchar(16) | NO | | NULL | |
| psk | varchar(255) | NO | | NULL | |
| dpd_action | enum('hold','clear','restart','disabled','restart-by-peer') | NO | | NULL | |
| dpd_interval | int(11) | NO | | NULL | |
| dpd_timeout | int(11) | NO | | NULL | |
| status | varchar(16) | NO | | NULL | |
| admin_state_up | tinyint(1) | NO | | NULL | |
| vpnservice_id | varchar(36) | NO | MUL | NULL | |
| ipsecpolicy_id | varchar(36) | NO | MUL | NULL | |
| ikepolicy_id | varchar(36) | NO | MUL | NULL | |
+----------------+-------------------------------------------------------------+------+-----+---------+-------+
19 rows in set (0.00 sec)

mysql> explain poolstatisticss;
+--------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+-------------+------+-----+---------+-------+
| pool_id | varchar(36) | NO | PRI | NULL | |
| bytes_in | bigint(20) | YES | | NULL | |
| bytes_out | bigint(20) | YES | | NULL | |
| active_connections | bigint(20) | YES | | NULL | |
| total_connections | bigint(20) | YES | | NULL | |
+--------------------+-------------+------+-----+---------+-------+

Tags: db
Changed in neutron:
assignee: nobody → Ann Kamyshnikova (akamyshnikova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → High
importance: High → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/78591
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=b131a5f63230b7107fad83787a964142d7289da9
Submitter: Jenkins
Branch: master

commit b131a5f63230b7107fad83787a964142d7289da9
Author: AKamyshnikova <email address hidden>
Date: Thu Mar 6 16:09:08 2014 +0400

    Restore NOT NULL constraint lost by earlier migrations

    Bring back nullable=False for columns in tables poolstatisticss
    and ipsec_site_connections that disapeared because of
    migrations abc88c33f74f and 338d7508968c correspondingly.

    Closes-bug: #1288681

    Change-Id: Idc4608616c2b4c06e7404157b2f708d46e91accc

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