yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #04639
[Bug 1207805] Re: FWaaS DB schema migration in not applied due to empty Enum definition
** Changed in: neutron
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1207805
Title:
FWaaS DB schema migration in not applied due to empty Enum definition
Status in OpenStack Neutron (virtual network service):
Fix Released
Bug description:
When applying migration 39cf3f799352_fwaas_havana_2_model on MySQL I
receive the following error:
sqlalchemy.exc.ProgrammingError: (ProgrammingError) (1064, "You have
an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '), \n\tenabled
BOOL, \n\tposition INTEGER, \n\tPRIMARY KEY (id), \n\tCONSTRAINT
firewall' at line 16") '\nCREATE TABLE firewall_rules (\n\ttenant_id
VARCHAR(255), \n\tid VARCHAR(36) NOT NULL, \n\tname VARCHAR(255),
\n\tdescription VARCHAR(1024), \n\tfirewall_policy_id VARCHAR(36),
\n\tshared BOOL, \n\tprotocol VARCHAR(24), \n\tip_version INTEGER NOT
NULL, \n\tsource_ip_address VARCHAR(46), \n\tdestination_ip_address
VARCHAR(46), \n\tsource_port_range_min INTEGER,
\n\tsource_port_range_max INTEGER, \n\tdestination_port_range_min
INTEGER, \n\tdestination_port_range_max INTEGER, \n\taction ENUM(),
\n\tenabled BOOL, \n\tposition INTEGER, \n\tPRIMARY KEY (id),
\n\tCONSTRAINT firewall_rules_ibfk_1 FOREIGN KEY(firewall_policy_id)
REFERENCES firewall_policies (id), \n\tCHECK (shared IN (0, 1)),
\n\tCHECK (enabled IN (0, 1))\n)\n\n' ()
The error is caused by empty Enum() definition in 39cf3f799352_fwaas_havana_2_model.py:
sa.Column('action', sa.Enum(), nullable=True),
While neutron/db/firewall/firewall_db.py contains:
action = sa.Column(sa.Enum('allow', 'deny', name='firewallrules_action'))
So the table is created successfully, if the initial DB schema is
generated based on models definitions, but it's not possible to
upgrade existing Neutron installation to the latest commit.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1207805/+subscriptions