← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1406723] Re: alembic migration fails to drop a table at drop mlnx plugin

 

[Expired for neutron because there has been no activity for 60 days.]

** Changed in: neutron
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1406723

Title:
  alembic migration fails to drop a table at drop mlnx plugin

Status in OpenStack Neutron (virtual network service):
  Expired

Bug description:
  The migration fails for 28c0ffb8ebbd_remove_mlnx_plugin.py when trying
  to drop the table port_profile (I'm guessing it has to do with the new
  MariaDB on F21 - mariadb-server-10.0.14-8.fc21.x86_64).

  The table itself is created like so:

  MariaDB [neutron]> SHOW CREATE TABLE port_profile\G;
  *************************** 1. row ***************************
         Table: port_profile
  Create Table: CREATE TABLE `port_profile` (
    `port_id` varchar(36) NOT NULL,
    `vnic_type` varchar(32) NOT NULL,
    PRIMARY KEY (`port_id`),
    CONSTRAINT `port_profile_ibfk_1` FOREIGN KEY (`port_id`) REFERENCES `ports` (`id`) ON DELETE CASCADE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8
  1 row in set (0.00 sec)

  2014-12-31 07:24:55.497 | INFO  [alembic.migration] Context impl MySQLImpl.
  2014-12-31 07:24:55.497 | INFO  [alembic.migration] Will assume non-transactional DDL.
  2014-12-31 07:24:56.249 | INFO  [alembic.migration] Running upgrade  -> havana, havana_initial
  2014-12-31 07:25:31.259 | INFO  [alembic.migration] Running upgrade havana -> e197124d4b9, add unique constraint to members
  2014-12-31 07:25:31.620 | INFO  [alembic.migration] Running upgrade e197124d4b9 -> 1fcfc149aca4, Add a unique constraint on (agent_type, host) columns to prevent a race
  2014-12-31 07:25:31.620 | condition when an agent entry is 'upserted'.
  2014-12-31 07:25:31.904 | INFO  [alembic.migration] Running upgrade 1fcfc149aca4 -> 50e86cb2637a, nsx_mappings
  2014-12-31 07:25:32.348 | INFO  [alembic.migration] Running upgrade 50e86cb2637a -> 1421183d533f, NSX DHCP/metadata support
  2014-12-31 07:25:33.033 | INFO  [alembic.migration] Running upgrade 1421183d533f -> 3d3cb89d84ee, nsx_switch_mappings
  2014-12-31 07:25:33.326 | INFO  [alembic.migration] Running upgrade 3d3cb89d84ee -> 4ca36cfc898c, nsx_router_mappings
  2014-12-31 07:25:33.636 | INFO  [alembic.migration] Running upgrade 4ca36cfc898c -> 27cc183af192, ml2_vnic_type
  2014-12-31 07:25:34.155 | INFO  [alembic.migration] Running upgrade 27cc183af192 -> 50d5ba354c23, ml2 binding:vif_details
  2014-12-31 07:25:35.085 | INFO  [alembic.migration] Running upgrade 50d5ba354c23 -> 157a5d299379, ml2 binding:profile
  2014-12-31 07:25:35.612 | INFO  [alembic.migration] Running upgrade 157a5d299379 -> 3d2585038b95, VMware NSX rebranding
  2014-12-31 07:25:35.905 | INFO  [alembic.migration] Running upgrade 3d2585038b95 -> abc88c33f74f, lb stats
  2014-12-31 07:25:38.415 | INFO  [alembic.migration] Running upgrade abc88c33f74f -> 1b2580001654, nsx_sec_group_mapping
  2014-12-31 07:25:38.708 | INFO  [alembic.migration] Running upgrade 1b2580001654 -> e766b19a3bb, nuage_initial
  2014-12-31 07:25:40.197 | INFO  [alembic.migration] Running upgrade e766b19a3bb -> 2eeaf963a447, floatingip_status
  2014-12-31 07:25:41.360 | INFO  [alembic.migration] Running upgrade 2eeaf963a447 -> 492a106273f8, Brocade ML2 Mech. Driver
  2014-12-31 07:25:41.987 | INFO  [alembic.migration] Running upgrade 492a106273f8 -> 24c7ea5160d7, Cisco CSR VPNaaS
  2014-12-31 07:25:42.297 | INFO  [alembic.migration] Running upgrade 24c7ea5160d7 -> 81c553f3776c, bsn_consistencyhashes
  2014-12-31 07:25:42.564 | INFO  [alembic.migration] Running upgrade 81c553f3776c -> 117643811bca, nec: delete old ofc mapping tables
  2014-12-31 07:25:43.404 | INFO  [alembic.migration] Running upgrade 117643811bca -> 19180cf98af6, nsx_gw_devices
  2014-12-31 07:25:44.099 | INFO  [alembic.migration] Running upgrade 19180cf98af6 -> 33dd0a9fa487, embrane_lbaas_driver
  2014-12-31 07:25:44.433 | INFO  [alembic.migration] Running upgrade 33dd0a9fa487 -> 2447ad0e9585, Add IPv6 Subnet properties
  2014-12-31 07:25:45.413 | INFO  [alembic.migration] Running upgrade 2447ad0e9585 -> 538732fa21e1, NEC Rename quantum_id to neutron_id
  2014-12-31 07:25:45.706 | INFO  [alembic.migration] Running upgrade 538732fa21e1 -> 5ac1c354a051, n1kv segment allocs for cisco n1kv plugin
  2014-12-31 07:25:47.941 | INFO  [alembic.migration] Running upgrade 5ac1c354a051 -> icehouse, icehouse
  2014-12-31 07:25:47.983 | INFO  [alembic.migration] Running upgrade icehouse -> 54f7549a0e5f, set_not_null_peer_address
  2014-12-31 07:25:48.058 | INFO  [alembic.migration] Running upgrade 54f7549a0e5f -> 1e5dd1d09b22, set_not_null_fields_lb_stats
  2014-12-31 07:25:49.793 | INFO  [alembic.migration] Running upgrade 1e5dd1d09b22 -> b65aa907aec, set_length_of_protocol_field
  2014-12-31 07:25:49.860 | INFO  [alembic.migration] Running upgrade b65aa907aec -> 33c3db036fe4, set_length_of_description_field_metering
  2014-12-31 07:25:49.918 | INFO  [alembic.migration] Running upgrade 33c3db036fe4 -> 4eca4a84f08a, Remove ML2 Cisco Credentials DB
  2014-12-31 07:25:50.094 | INFO  [alembic.migration] Running upgrade 4eca4a84f08a -> d06e871c0d5, set_admin_state_up_not_null_ml2
  2014-12-31 07:25:50.563 | INFO  [alembic.migration] Running upgrade d06e871c0d5 -> 6be312499f9, set_not_null_vlan_id_cisco
  2014-12-31 07:25:50.622 | INFO  [alembic.migration] Running upgrade 6be312499f9 -> 1b837a7125a9, Cisco APIC Mechanism Driver
  2014-12-31 07:25:51.459 | INFO  [alembic.migration] Running upgrade 1b837a7125a9 -> 10cd28e692e9, nuage_extraroute
  2014-12-31 07:25:51.810 | INFO  [alembic.migration] Running upgrade 10cd28e692e9 -> 2db5203cb7a9, nuage_floatingip
  2014-12-31 07:25:53.115 | INFO  [alembic.migration] Running upgrade 2db5203cb7a9 -> 5446f2a45467, set_server_default
  2014-12-31 07:25:53.232 | INFO  [alembic.migration] Running upgrade 5446f2a45467 -> db_healing, Include all tables and make migrations unconditional.
  2014-12-31 07:25:53.232 | INFO  [alembic.migration] Context impl MySQLImpl.
  2014-12-31 07:25:53.233 | INFO  [alembic.migration] Will assume non-transactional DDL.
  2014-12-31 07:25:53.686 | INFO  [alembic.autogenerate.compare] Detected server default on column 'cisco_ml2_apic_epgs.provider'
  2014-12-31 07:25:53.694 | INFO  [alembic.autogenerate.compare] Detected server default on column 'cisco_n1kv_vxlan_allocations.allocated'
  2014-12-31 07:25:53.695 | INFO  [alembic.autogenerate.compare] Detected server default on column 'cisco_network_profiles.multicast_ip_index'
  2014-12-31 07:25:53.730 | INFO  [alembic.autogenerate.compare] Detected server default on column 'meteringlabelrules.excluded'
  2014-12-31 07:25:53.735 | INFO  [alembic.autogenerate.compare] Detected server default on column 'ml2_port_bindings.host'
  2014-12-31 07:25:53.758 | INFO  [alembic.autogenerate.compare] Detected removed foreign key (router_id)(id) on table nuage_floatingip_pool_mapping
  2014-12-31 07:25:53.762 | INFO  [alembic.autogenerate.compare] Detected added column 'nuage_routerroutes_mapping.destination'
  2014-12-31 07:25:53.762 | INFO  [alembic.autogenerate.compare] Detected added column 'nuage_routerroutes_mapping.nexthop'
  2014-12-31 07:25:53.773 | INFO  [alembic.autogenerate.compare] Detected server default on column 'poolmonitorassociations.status'
  2014-12-31 07:25:53.786 | INFO  [alembic.autogenerate.compare] Detected added index 'ix_quotas_tenant_id' on '['tenant_id']'
  2014-12-31 07:25:55.038 | INFO  [alembic.migration] Running upgrade db_healing -> 3927f7f7c456, L3 extension distributed mode
  2014-12-31 07:25:55.356 | INFO  [alembic.migration] Running upgrade 3927f7f7c456 -> 2026156eab2f, L2 models to support DVR
  2014-12-31 07:25:56.017 | INFO  [alembic.migration] Running upgrade 2026156eab2f -> 37f322991f59, removing_mapping_tables
  2014-12-31 07:25:56.620 | INFO  [alembic.migration] Running upgrade 37f322991f59 -> 31d7f831a591, add constraint for routerid
  2014-12-31 07:25:59.249 | INFO  [alembic.migration] Running upgrade 31d7f831a591 -> 5589aa32bf80, L3 scheduler additions to support DVR
  2014-12-31 07:25:59.625 | INFO  [alembic.migration] Running upgrade 5589aa32bf80 -> 884573acbf1c, Drop NSX table in favor of the extra_attributes one
  2014-12-31 07:26:00.153 | INFO  [alembic.migration] Running upgrade 884573acbf1c -> 4eba2f05c2f4, correct Vxlan Endpoint primary key
  2014-12-31 07:26:01.266 | INFO  [alembic.migration] Running upgrade 4eba2f05c2f4 -> 327ee5fde2c7, set_innodb_engine
  2014-12-31 07:26:03.092 | INFO  [alembic.migration] Running upgrade 327ee5fde2c7 -> 3b85b693a95f, Drop unused servicedefinitions and servicetypes tables.
  2014-12-31 07:26:03.134 | INFO  [alembic.migration] Running upgrade 3b85b693a95f -> aae5706a396, nuage_provider_networks
  2014-12-31 07:26:03.419 | INFO  [alembic.migration] Running upgrade aae5706a396 -> 32f3915891fd, cisco_apic_driver_update
  2014-12-31 07:26:04.129 | INFO  [alembic.migration] Running upgrade 32f3915891fd -> 58fe87a01143, cisco_csr_routing
  2014-12-31 07:26:05.133 | INFO  [alembic.migration] Running upgrade 58fe87a01143 -> 236b90af57ab, ml2_type_driver_refactor_dynamic_segments
  2014-12-31 07:26:05.677 | INFO  [alembic.migration] Running upgrade 236b90af57ab -> 86d6d9776e2b, Cisco APIC Mechanism Driver
  2014-12-31 07:26:06.238 | INFO  [alembic.migration] Running upgrade 86d6d9776e2b -> 16a27a58e093, ext_l3_ha_mode
  2014-12-31 07:26:07.971 | INFO  [alembic.migration] Running upgrade 16a27a58e093 -> 3c346828361e, metering_label_shared
  2014-12-31 07:26:08.449 | INFO  [alembic.migration] Running upgrade 3c346828361e -> 1680e1f0c4dc, Remove Cisco Nexus Monolithic Plugin
  2014-12-31 07:26:08.599 | INFO  [alembic.migration] Running upgrade 1680e1f0c4dc -> 544673ac99ab, add router port relationship
  2014-12-31 07:26:08.934 | INFO  [alembic.migration] Running upgrade 544673ac99ab -> juno, juno
  2014-12-31 07:26:08.976 | INFO  [alembic.migration] Running upgrade juno -> 44621190bc02, add_uniqueconstraint_ipavailability_ranges
  2014-12-31 07:26:09.479 | INFO  [alembic.migration] Running upgrade 44621190bc02 -> 1f71e54a85e7, ml2_network_segments models change for multi-segment network.
  2014-12-31 07:26:09.989 | INFO  [alembic.migration] Running upgrade 1f71e54a85e7 -> 408cfbf6923c, remove ryu plugin
  2014-12-31 07:26:10.232 | INFO  [alembic.migration] Running upgrade 408cfbf6923c -> 28c0ffb8ebbd, remove mlnx plugin
  2014-12-31 07:26:10.778 | Traceback (most recent call last):
  2014-12-31 07:26:10.778 |   File "/usr/bin/neutron-db-manage", line 10, in <module>
  2014-12-31 07:26:10.778 |     sys.exit(main())
  2014-12-31 07:26:10.778 |   File "/opt/stack/neutron/neutron/db/migration/cli.py", line 200, in main
  2014-12-31 07:26:10.778 |     CONF.command.func(config, CONF.command.name)
  2014-12-31 07:26:10.779 |   File "/opt/stack/neutron/neutron/db/migration/cli.py", line 93, in do_upgrade_downgrade
  2014-12-31 07:26:10.779 |     do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
  2014-12-31 07:26:10.779 |   File "/opt/stack/neutron/neutron/db/migration/cli.py", line 71, in do_alembic_command
  2014-12-31 07:26:10.779 |     getattr(alembic_command, cmd)(config, *args, **kwargs)
  2014-12-31 07:26:10.779 |   File "/usr/lib/python2.7/site-packages/alembic/command.py", line 165, in upgrade
  2014-12-31 07:26:10.779 |     script.run_env()
  2014-12-31 07:26:10.779 |   File "/usr/lib/python2.7/site-packages/alembic/script.py", line 382, in run_env
  2014-12-31 07:26:10.779 |     util.load_python_file(self.dir, 'env.py')
  2014-12-31 07:26:10.779 |   File "/usr/lib/python2.7/site-packages/alembic/util.py", line 241, in load_python_file
  2014-12-31 07:26:10.779 |     module = load_module_py(module_id, path)
  2014-12-31 07:26:10.779 |   File "/usr/lib/python2.7/site-packages/alembic/compat.py", line 79, in load_module_py
  2014-12-31 07:26:10.779 |     mod = imp.load_source(module_id, path, fp)
  2014-12-31 07:26:10.779 |   File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py", line 109, in <module>
  2014-12-31 07:26:10.779 |     run_migrations_online()
  2014-12-31 07:26:10.779 |   File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py", line 100, in run_migrations_online
  2014-12-31 07:26:10.779 |     context.run_migrations()
  2014-12-31 07:26:10.779 |   File "<string>", line 7, in run_migrations
  2014-12-31 07:26:10.779 |   File "/usr/lib/python2.7/site-packages/alembic/environment.py", line 742, in run_migrations
  2014-12-31 07:26:10.779 |     self.get_context().run_migrations(**kw)
  2014-12-31 07:26:10.779 |   File "/usr/lib/python2.7/site-packages/alembic/migration.py", line 305, in run_migrations
  2014-12-31 07:26:10.779 |     step.migration_fn(**kw)
  2014-12-31 07:26:10.779 |   File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/28c0ffb8ebbd_remove_mlnx_plugin.py", line 35, in upgrade
  2014-12-31 07:26:10.779 |     op.drop_table('port_profile')
  2014-12-31 07:26:10.779 |   File "<string>", line 7, in drop_table
  2014-12-31 07:26:10.779 |   File "/usr/lib/python2.7/site-packages/alembic/operations.py", line 962, in drop_table
  2014-12-31 07:26:10.779 |     self._table(name, **kw)
  2014-12-31 07:26:10.779 |   File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 190, in drop_table
  2014-12-31 07:26:10.779 |     self._exec(schema.DropTable(table))
  2014-12-31 07:26:10.780 |   File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 105, in _exec
  2014-12-31 07:26:10.780 |     return conn.execute(construct, *multiparams, **params)
  2014-12-31 07:26:10.780 |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 729, in execute
  2014-12-31 07:26:10.780 |     return meth(self, multiparams, params)
  2014-12-31 07:26:10.780 |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 69, in _execute_on_connection
  2014-12-31 07:26:10.780 |     return connection._execute_ddl(self, multiparams, params)
  2014-12-31 07:26:10.780 |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 783, in _execute_ddl
  2014-12-31 07:26:10.780 |     compiled
  2014-12-31 07:26:10.780 |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 958, in _execute_context
  2014-12-31 07:26:10.780 |     context)
  2014-12-31 07:26:10.780 |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1155, in _handle_dbapi_exception
  2014-12-31 07:26:10.780 |     util.raise_from_cause(newraise, exc_info)
  2014-12-31 07:26:10.780 |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
  2014-12-31 07:26:10.780 |     reraise(type(exception), exception, tb=exc_tb)
  2014-12-31 07:26:10.780 |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
  2014-12-31 07:26:10.780 |     context)
  2014-12-31 07:26:10.780 |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 436, in do_execute
  2014-12-31 07:26:10.780 |     cursor.execute(statement, parameters)
  2014-12-31 07:26:10.781 |   File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
  2014-12-31 07:26:10.781 |     self.errorhandler(self, exc, value)
  2014-12-31 07:26:10.781 |   File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
  2014-12-31 07:26:10.781 |     raise errorclass, errorvalue
  2014-12-31 07:26:10.781 | oslo.db.exception.DBConnectionError: (OperationalError) (2013, 'Lost connection to MySQL server during query') '\nDROP TABLE port_profile' ()

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1406723/+subscriptions


References