← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1285641] [NEW] different fully qualified class name for VPNaaS migrations

 

Public bug reported:

In migrations 52ff27f7567a_support_for_vpnaas.py and  338d7508968c_vpnaas_peer_address_.py different class names are set:  neutron.services.vpn.plugin.VPNDriverPlugin and neutron.services.vpn.plugin.VPNPlugin.
This cause the following exception:

neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head
No handlers could be found for logger "neutron.common.legacy"
INFO  [alembic.migration] Context impl MySQLImpl.
INFO  [alembic.migration] Will assume non-transactional DDL.
INFO  [alembic.migration] Running upgrade None -> folsom, folsom initial database
INFO  [alembic.migration] Running upgrade folsom -> 2c4af419145b, l3_support
INFO  [alembic.migration] Running upgrade 2c4af419145b -> 5a875d0e5c, ryu
INFO  [alembic.migration] Running upgrade 5a875d0e5c -> 48b6f43f7471, DB support for service types
INFO  [alembic.migration] Running upgrade 48b6f43f7471 -> 3cb5d900c5de, security_groups
INFO  [alembic.migration] Running upgrade 3cb5d900c5de -> 1d76643bcec4, nvp_netbinding
INFO  [alembic.migration] Running upgrade 1d76643bcec4 -> 2a6d0b51f4bb, cisco plugin cleanup
INFO  [alembic.migration] Running upgrade 2a6d0b51f4bb -> 1b693c095aa3, Quota ext support added in Grizzly
INFO  [alembic.migration] Running upgrade 1b693c095aa3 -> 1149d7de0cfa, initial port security
INFO  [alembic.migration] Running upgrade 1149d7de0cfa -> 49332180ca96, ryu plugin update
INFO  [alembic.migration] Running upgrade 49332180ca96 -> 38335592a0dc, nvp_portmap
INFO  [alembic.migration] Running upgrade 38335592a0dc -> 54c2c487e913, 'DB support for load balancing service
INFO  [alembic.migration] Running upgrade 54c2c487e913 -> 45680af419f9, nvp_qos
INFO  [alembic.migration] Running upgrade 45680af419f9 -> 1c33fa3cd1a1, Support routing table configuration on Router
INFO  [alembic.migration] Running upgrade 1c33fa3cd1a1 -> 363468ac592c, nvp_network_gw
INFO  [alembic.migration] Running upgrade 363468ac592c -> 511471cc46b, Add agent management extension model support
INFO  [alembic.migration] Running upgrade 511471cc46b -> 3b54bf9e29f7, NEC plugin sharednet
INFO  [alembic.migration] Running upgrade 3b54bf9e29f7 -> 4692d074d587, agent scheduler
INFO  [alembic.migration] Running upgrade 4692d074d587 -> 1341ed32cc1e, nvp_net_binding
INFO  [alembic.migration] Running upgrade 1341ed32cc1e -> grizzly, grizzly
INFO  [alembic.migration] Running upgrade grizzly -> f489cf14a79c, DB support for load balancing service (havana)
INFO  [alembic.migration] Running upgrade f489cf14a79c -> 176a85fc7d79, Add portbindings db
INFO  [alembic.migration] Running upgrade 176a85fc7d79 -> 32b517556ec9, remove TunnelIP model
INFO  [alembic.migration] Running upgrade 32b517556ec9 -> 128e042a2b68, ext_gw_mode
INFO  [alembic.migration] Running upgrade 128e042a2b68 -> 5ac71e65402c, ml2_initial
INFO  [alembic.migration] Running upgrade 5ac71e65402c -> 3cbf70257c28, nvp_mac_learning
INFO  [alembic.migration] Running upgrade 3cbf70257c28 -> 5918cbddab04, add tables for router rules support
INFO  [alembic.migration] Running upgrade 5918cbddab04 -> 3cabb850f4a5, Table to track port to host associations
INFO  [alembic.migration] Running upgrade 3cabb850f4a5 -> b7a8863760e, Remove cisco_vlan_bindings table
INFO  [alembic.migration] Running upgrade b7a8863760e -> 13de305df56e, nec_add_pf_name
INFO  [alembic.migration] Running upgrade 13de305df56e -> 20ae61555e95, DB Migration for ML2 GRE Type Driver
INFO  [alembic.migration] Running upgrade 20ae61555e95 -> 477a4488d3f4, DB Migration for ML2 VXLAN Type Driver
INFO  [alembic.migration] Running upgrade 477a4488d3f4 -> 2032abe8edac, LBaaS add status description
INFO  [alembic.migration] Running upgrade 2032abe8edac -> 52c5e4a18807, LBaaS Pool scheduler
INFO  [alembic.migration] Running upgrade 52c5e4a18807 -> 557edfc53098, New service types framework (service providers)
INFO  [alembic.migration] Running upgrade 557edfc53098 -> e6b16a30d97, Add cisco_provider_networks table
INFO  [alembic.migration] Running upgrade e6b16a30d97 -> 39cf3f799352, FWaaS Havana-2 model
INFO  [alembic.migration] Running upgrade 39cf3f799352 -> 52ff27f7567a, Support for VPNaaS
INFO  [alembic.migration] Running upgrade 52ff27f7567a -> 11c6e18605c8, Pool Monitor status field
INFO  [alembic.migration] Running upgrade 11c6e18605c8 -> 35c7c198ddea, remove status from HealthMonitor
INFO  [alembic.migration] Running upgrade 35c7c198ddea -> 263772d65691, Cisco plugin db cleanup part II
INFO  [alembic.migration] Running upgrade 263772d65691 -> c88b6b5fea3, Cisco N1KV tables
INFO  [alembic.migration] Running upgrade c88b6b5fea3 -> f9263d6df56, remove_dhcp_lease
INFO  [alembic.migration] Running upgrade f9263d6df56 -> 569e98a8132b, metering
INFO  [alembic.migration] Running upgrade 569e98a8132b -> 86cf4d88bd3, remove bigswitch port tracking table
INFO  [alembic.migration] Running upgrade 86cf4d88bd3 -> 3c6e57a23db4, add multiprovider
INFO  [alembic.migration] Running upgrade 3c6e57a23db4 -> 63afba73813, Add unique constraint for id column of TunnelEndpoint
INFO  [alembic.migration] Running upgrade 63afba73813 -> 40dffbf4b549, nvp_dist_router
INFO  [alembic.migration] Running upgrade 40dffbf4b549 -> 53bbd27ec841, Extra dhcp opts support
INFO  [alembic.migration] Running upgrade 53bbd27ec841 -> 46a0efbd8f0, cisco_n1kv_multisegment_trunk
INFO  [alembic.migration] Running upgrade 46a0efbd8f0 -> 2a3bae1ceb8, NEC Port Binding
INFO  [alembic.migration] Running upgrade 2a3bae1ceb8 -> 14f24494ca31, DB Migration for Arista ml2 mechanism driver
INFO  [alembic.migration] Running upgrade 14f24494ca31 -> 32a65f71af51, ml2 portbinding
INFO  [alembic.migration] Running upgrade 32a65f71af51 -> 66a59a7f516, NEC OpenFlow Router
INFO  [alembic.migration] Running upgrade 66a59a7f516 -> 51b4de912379, Cisco Nexus ML2 mechanism driver
INFO  [alembic.migration] Running upgrade 51b4de912379 -> 1efb85914233, allowedaddresspairs
INFO  [alembic.migration] Running upgrade 1efb85914233 -> 38fc1f6789f8, Cisco N1KV overlay support
INFO  [alembic.migration] Running upgrade 38fc1f6789f8 -> 4a666eb208c2, service router
INFO  [alembic.migration] Running upgrade 4a666eb208c2 -> 338d7508968c, vpnaas peer_address size increase
Traceback (most recent call last):
  File "/usr/local/bin/neutron-db-manage", line 10, in <module>
    sys.exit(main())
  File "/opt/stack/neutron/neutron/db/migration/cli.py", line 145, in main
    CONF.command.func(config, CONF.command.name)
  File "/opt/stack/neutron/neutron/db/migration/cli.py", line 80, in do_upgrade_downgrade
    do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
  File "/opt/stack/neutron/neutron/db/migration/cli.py", line 59, in do_alembic_command
    getattr(alembic_command, cmd)(config, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 124, in upgrade
    script.run_env()
  File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 199, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 205, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/local/lib/python2.7/dist-packages/alembic/compat.py", line 58, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py", line 105, in <module>
    run_migrations_online()
  File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py", line 89, in run_migrations_online
    options=build_options())
  File "<string>", line 7, in run_migrations
  File "/usr/local/lib/python2.7/dist-packages/alembic/environment.py", line 681, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/usr/local/lib/python2.7/dist-packages/alembic/migration.py", line 225, in run_migrations
    change(**kw)
  File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/338d7508968c_vpnaas_peer_address_.py", line 48, in upgrade
    type_=sa.String(255), existing_type=sa.String(64))
  File "<string>", line 7, in alter_column
  File "<string>", line 1, in <lambda>
  File "/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 322, in go
    return fn(*arg, **kw)
  File "/usr/local/lib/python2.7/dist-packages/alembic/operations.py", line 300, in alter_column
    existing_autoincrement=existing_autoincrement
  File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/mysql.py", line 42, in alter_column
    else existing_autoincrement
  File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 76, in _exec
    conn.execute(construct, *multiparams, **params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute
    params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1542, in _execute_ddl
    compiled
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
sqlalchemy.exc.ProgrammingError: (ProgrammingError) (1146, "Table 'neutron_ml2.ipsec_site_connections' doesn't exist") 'ALTER TABLE ipsec_site_connections CHANGE peer_address peer_address VARCHAR(255) NULL' ()

** Affects: neutron
     Importance: Undecided
     Assignee: Ann Kamyshnikova (akamyshnikova)
         Status: New


** Tags: db

** Changed in: neutron
     Assignee: (unassigned) => Ann Kamyshnikova (akamyshnikova)

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

Title:
  different fully qualified class name for VPNaaS migrations

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  In migrations 52ff27f7567a_support_for_vpnaas.py and  338d7508968c_vpnaas_peer_address_.py different class names are set:  neutron.services.vpn.plugin.VPNDriverPlugin and neutron.services.vpn.plugin.VPNPlugin.
  This cause the following exception:

  neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head
  No handlers could be found for logger "neutron.common.legacy"
  INFO  [alembic.migration] Context impl MySQLImpl.
  INFO  [alembic.migration] Will assume non-transactional DDL.
  INFO  [alembic.migration] Running upgrade None -> folsom, folsom initial database
  INFO  [alembic.migration] Running upgrade folsom -> 2c4af419145b, l3_support
  INFO  [alembic.migration] Running upgrade 2c4af419145b -> 5a875d0e5c, ryu
  INFO  [alembic.migration] Running upgrade 5a875d0e5c -> 48b6f43f7471, DB support for service types
  INFO  [alembic.migration] Running upgrade 48b6f43f7471 -> 3cb5d900c5de, security_groups
  INFO  [alembic.migration] Running upgrade 3cb5d900c5de -> 1d76643bcec4, nvp_netbinding
  INFO  [alembic.migration] Running upgrade 1d76643bcec4 -> 2a6d0b51f4bb, cisco plugin cleanup
  INFO  [alembic.migration] Running upgrade 2a6d0b51f4bb -> 1b693c095aa3, Quota ext support added in Grizzly
  INFO  [alembic.migration] Running upgrade 1b693c095aa3 -> 1149d7de0cfa, initial port security
  INFO  [alembic.migration] Running upgrade 1149d7de0cfa -> 49332180ca96, ryu plugin update
  INFO  [alembic.migration] Running upgrade 49332180ca96 -> 38335592a0dc, nvp_portmap
  INFO  [alembic.migration] Running upgrade 38335592a0dc -> 54c2c487e913, 'DB support for load balancing service
  INFO  [alembic.migration] Running upgrade 54c2c487e913 -> 45680af419f9, nvp_qos
  INFO  [alembic.migration] Running upgrade 45680af419f9 -> 1c33fa3cd1a1, Support routing table configuration on Router
  INFO  [alembic.migration] Running upgrade 1c33fa3cd1a1 -> 363468ac592c, nvp_network_gw
  INFO  [alembic.migration] Running upgrade 363468ac592c -> 511471cc46b, Add agent management extension model support
  INFO  [alembic.migration] Running upgrade 511471cc46b -> 3b54bf9e29f7, NEC plugin sharednet
  INFO  [alembic.migration] Running upgrade 3b54bf9e29f7 -> 4692d074d587, agent scheduler
  INFO  [alembic.migration] Running upgrade 4692d074d587 -> 1341ed32cc1e, nvp_net_binding
  INFO  [alembic.migration] Running upgrade 1341ed32cc1e -> grizzly, grizzly
  INFO  [alembic.migration] Running upgrade grizzly -> f489cf14a79c, DB support for load balancing service (havana)
  INFO  [alembic.migration] Running upgrade f489cf14a79c -> 176a85fc7d79, Add portbindings db
  INFO  [alembic.migration] Running upgrade 176a85fc7d79 -> 32b517556ec9, remove TunnelIP model
  INFO  [alembic.migration] Running upgrade 32b517556ec9 -> 128e042a2b68, ext_gw_mode
  INFO  [alembic.migration] Running upgrade 128e042a2b68 -> 5ac71e65402c, ml2_initial
  INFO  [alembic.migration] Running upgrade 5ac71e65402c -> 3cbf70257c28, nvp_mac_learning
  INFO  [alembic.migration] Running upgrade 3cbf70257c28 -> 5918cbddab04, add tables for router rules support
  INFO  [alembic.migration] Running upgrade 5918cbddab04 -> 3cabb850f4a5, Table to track port to host associations
  INFO  [alembic.migration] Running upgrade 3cabb850f4a5 -> b7a8863760e, Remove cisco_vlan_bindings table
  INFO  [alembic.migration] Running upgrade b7a8863760e -> 13de305df56e, nec_add_pf_name
  INFO  [alembic.migration] Running upgrade 13de305df56e -> 20ae61555e95, DB Migration for ML2 GRE Type Driver
  INFO  [alembic.migration] Running upgrade 20ae61555e95 -> 477a4488d3f4, DB Migration for ML2 VXLAN Type Driver
  INFO  [alembic.migration] Running upgrade 477a4488d3f4 -> 2032abe8edac, LBaaS add status description
  INFO  [alembic.migration] Running upgrade 2032abe8edac -> 52c5e4a18807, LBaaS Pool scheduler
  INFO  [alembic.migration] Running upgrade 52c5e4a18807 -> 557edfc53098, New service types framework (service providers)
  INFO  [alembic.migration] Running upgrade 557edfc53098 -> e6b16a30d97, Add cisco_provider_networks table
  INFO  [alembic.migration] Running upgrade e6b16a30d97 -> 39cf3f799352, FWaaS Havana-2 model
  INFO  [alembic.migration] Running upgrade 39cf3f799352 -> 52ff27f7567a, Support for VPNaaS
  INFO  [alembic.migration] Running upgrade 52ff27f7567a -> 11c6e18605c8, Pool Monitor status field
  INFO  [alembic.migration] Running upgrade 11c6e18605c8 -> 35c7c198ddea, remove status from HealthMonitor
  INFO  [alembic.migration] Running upgrade 35c7c198ddea -> 263772d65691, Cisco plugin db cleanup part II
  INFO  [alembic.migration] Running upgrade 263772d65691 -> c88b6b5fea3, Cisco N1KV tables
  INFO  [alembic.migration] Running upgrade c88b6b5fea3 -> f9263d6df56, remove_dhcp_lease
  INFO  [alembic.migration] Running upgrade f9263d6df56 -> 569e98a8132b, metering
  INFO  [alembic.migration] Running upgrade 569e98a8132b -> 86cf4d88bd3, remove bigswitch port tracking table
  INFO  [alembic.migration] Running upgrade 86cf4d88bd3 -> 3c6e57a23db4, add multiprovider
  INFO  [alembic.migration] Running upgrade 3c6e57a23db4 -> 63afba73813, Add unique constraint for id column of TunnelEndpoint
  INFO  [alembic.migration] Running upgrade 63afba73813 -> 40dffbf4b549, nvp_dist_router
  INFO  [alembic.migration] Running upgrade 40dffbf4b549 -> 53bbd27ec841, Extra dhcp opts support
  INFO  [alembic.migration] Running upgrade 53bbd27ec841 -> 46a0efbd8f0, cisco_n1kv_multisegment_trunk
  INFO  [alembic.migration] Running upgrade 46a0efbd8f0 -> 2a3bae1ceb8, NEC Port Binding
  INFO  [alembic.migration] Running upgrade 2a3bae1ceb8 -> 14f24494ca31, DB Migration for Arista ml2 mechanism driver
  INFO  [alembic.migration] Running upgrade 14f24494ca31 -> 32a65f71af51, ml2 portbinding
  INFO  [alembic.migration] Running upgrade 32a65f71af51 -> 66a59a7f516, NEC OpenFlow Router
  INFO  [alembic.migration] Running upgrade 66a59a7f516 -> 51b4de912379, Cisco Nexus ML2 mechanism driver
  INFO  [alembic.migration] Running upgrade 51b4de912379 -> 1efb85914233, allowedaddresspairs
  INFO  [alembic.migration] Running upgrade 1efb85914233 -> 38fc1f6789f8, Cisco N1KV overlay support
  INFO  [alembic.migration] Running upgrade 38fc1f6789f8 -> 4a666eb208c2, service router
  INFO  [alembic.migration] Running upgrade 4a666eb208c2 -> 338d7508968c, vpnaas peer_address size increase
  Traceback (most recent call last):
    File "/usr/local/bin/neutron-db-manage", line 10, in <module>
      sys.exit(main())
    File "/opt/stack/neutron/neutron/db/migration/cli.py", line 145, in main
      CONF.command.func(config, CONF.command.name)
    File "/opt/stack/neutron/neutron/db/migration/cli.py", line 80, in do_upgrade_downgrade
      do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
    File "/opt/stack/neutron/neutron/db/migration/cli.py", line 59, in do_alembic_command
      getattr(alembic_command, cmd)(config, *args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 124, in upgrade
      script.run_env()
    File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 199, in run_env
      util.load_python_file(self.dir, 'env.py')
    File "/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 205, in load_python_file
      module = load_module_py(module_id, path)
    File "/usr/local/lib/python2.7/dist-packages/alembic/compat.py", line 58, in load_module_py
      mod = imp.load_source(module_id, path, fp)
    File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py", line 105, in <module>
      run_migrations_online()
    File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/env.py", line 89, in run_migrations_online
      options=build_options())
    File "<string>", line 7, in run_migrations
    File "/usr/local/lib/python2.7/dist-packages/alembic/environment.py", line 681, in run_migrations
      self.get_context().run_migrations(**kw)
    File "/usr/local/lib/python2.7/dist-packages/alembic/migration.py", line 225, in run_migrations
      change(**kw)
    File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/338d7508968c_vpnaas_peer_address_.py", line 48, in upgrade
      type_=sa.String(255), existing_type=sa.String(64))
    File "<string>", line 7, in alter_column
    File "<string>", line 1, in <lambda>
    File "/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 322, in go
      return fn(*arg, **kw)
    File "/usr/local/lib/python2.7/dist-packages/alembic/operations.py", line 300, in alter_column
      existing_autoincrement=existing_autoincrement
    File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/mysql.py", line 42, in alter_column
      else existing_autoincrement
    File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 76, in _exec
      conn.execute(construct, *multiparams, **params)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute
      params)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1542, in _execute_ddl
      compiled
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
      context)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
      context)
    File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute
      cursor.execute(statement, parameters)
    File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
      self.errorhandler(self, exc, value)
    File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
      raise errorclass, errorvalue
  sqlalchemy.exc.ProgrammingError: (ProgrammingError) (1146, "Table 'neutron_ml2.ipsec_site_connections' doesn't exist") 'ALTER TABLE ipsec_site_connections CHANGE peer_address peer_address VARCHAR(255) NULL' ()

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


Follow ups

References