neutron-db-migration crash at upgrade 26b54cf9024d -> 14be42f3d0a5, Add default security group table

Bug #1459370 reported by 0x61
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Expired
Undecided
Unassigned

Bug Description

When i run this on empty db :

```
neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head
```

I have this error :

```
INFO [alembic.migration] Running upgrade 26b54cf9024d -> 14be42f3d0a5, Add default security group table
Traceback (most recent call last):
  File "/usr/bin/neutron-db-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 238, in main
    CONF.command.func(config, CONF.command.name)
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 106, in do_upgrade
    do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/cli.py", line 72, in do_alembic_command
    getattr(alembic_command, cmd)(config, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/alembic/command.py", line 125, in upgrade
    script.run_env()
  File "/usr/lib/python2.7/dist-packages/alembic/script.py", line 203, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/lib/python2.7/dist-packages/alembic/util.py", line 212, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/lib/python2.7/dist-packages/alembic/compat.py", line 58, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/env.py", line 109, in <module>
    run_migrations_online()
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/env.py", line 100, in run_migrations_online
    context.run_migrations()
  File "<string>", line 7, in run_migrations
  File "/usr/lib/python2.7/dist-packages/alembic/environment.py", line 688, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/usr/lib/python2.7/dist-packages/alembic/migration.py", line 258, in run_migrations
    change(**kw)
  File "/usr/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/versions/14be42f3d0a5_default_sec_group_table.py", line 62, in upgrade
    ins = table.insert(inline=True).from_select(['tenant_id',
AttributeError: 'NoneType' object has no attribute 'insert'
```

```
dpkg -l | grep neutron
ii neutron-common 2015.1.0-2~bpo8+1 all OpenStack virtual network service - common files
ii neutron-dhcp-agent 2015.1.0-2~bpo8+1 all OpenStack virtual network service - DHCP agent
ii neutron-l3-agent 2015.1.0-2~bpo8+1 all OpenStack virtual network service - l3 agent
ii neutron-lbaas-agent 2015.1.0-2~bpo8+1 all OpenStack virtual network service - lbass agent
ii neutron-metadata-agent 2015.1.0-2~bpo8+1 all OpenStack virtual network service - metadata agent
ii neutron-openvswitch-agent 2015.1.0-2~bpo8+1 all OpenStack virtual network service - Open vSwitch agent
ii neutron-plugin-openvswitch-agent 2015.1.0-2~bpo8+1 all transitional dummy package for switching to Neutron OpenVswitch agent.
ii neutron-server 2015.1.0-2~bpo8+1 all OpenStack virtual network service - server
ii python-neutron 2015.1.0-2~bpo8+1 all OpenStack virtual network service - Python library
ii python-neutronclient 2.4.0-1~bpo8+1 all client API library for Neutron
```

file : http://git.openstack.org/cgit/openstack/neutron/tree/neutron/db/migration/alembic_migrations/versions/14be42f3d0a5_default_sec_group_table.py?id=79c97120de9cff4d0992b5d41ff4bbf05e890f89

Tags: db
Revision history for this message
0x61 (0x61) wrote :

I also have this problem : https://bugs.launchpad.net/neutron/+bug/1423250 - http://pastebin.com/QAGz28C4
I think it must match. The keystone server does not start.

0x61 (0x61)
information type: Public → Private
information type: Private → Public
Revision history for this message
Ann Taraday (akamyshnikova) wrote :

What backend do you use?

tags: added: db
Changed in neutron:
status: New → Incomplete
assignee: nobody → Ann Kamyshnikova (akamyshnikova)
Revision history for this message
MotoKen (motokentsai) wrote :

I also hit this issue when I use python-alembic 0.6.5.

It was solved when I upgraded python-alembic 0.6.5 to 0.7.2.

Revision history for this message
Ann Taraday (akamyshnikova) wrote :
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

This bug is > 172 days without activity. We are unsetting assignee and milestone and setting status to Incomplete in order to allow its expiry in 60 days.

If the bug is still valid, then update the bug status.

Changed in neutron:
assignee: Ann Kamyshnikova (akamyshnikova) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in neutron:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.