neutron db migration fails on openstack-origin upgrade

Bug #1381194 reported by Corey Bryant
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron-api (Juju Charms Collection)
Fix Released
Undecided
Corey Bryant

Bug Description

This can be recreated by deploying with the default openstack-origin on trusty and then setting openstack-origin=ppa:ubuntu-cloud-archive/juno-staging for the neutron-api charm.

I'm using our next.yaml and then upgrading in this order:
    keystone swift-storage-z1 swift-storage-z2 swift-storage-z3 \
    swift-proxy cinder glance ceilometer ceilometer-agent \
    neutron-api neutron-gateway openstack-dashboard \
    nova-cloud-controller nova-compute

Here's the traceback:

2014-10-14 17:29:57 INFO config-changed Traceback (most recent call last):
2014-10-14 17:29:57 INFO config-changed File "/var/lib/juju/agents/unit-neutron-api-0/charm/hooks/config-changed", line 400, in <module>
2014-10-14 17:29:57 INFO config-changed main()
2014-10-14 17:29:57 INFO config-changed File "/var/lib/juju/agents/unit-neutron-api-0/charm/hooks/config-changed", line 394, in main
2014-10-14 17:29:57 INFO config-changed hooks.execute(sys.argv)
2014-10-14 17:29:57 INFO config-changed File "/var/lib/juju/agents/unit-neutron-api-0/charm/hooks/charmhelpers/core/hookenv.py", line 502, in execute
2014-10-14 17:29:57 INFO config-changed self._hooks[hook_name]()
2014-10-14 17:29:57 INFO config-changed File "/var/lib/juju/agents/unit-neutron-api-0/charm/hooks/charmhelpers/core/host.py", line 268, in wrapped_f
2014-10-14 17:29:57 INFO config-changed f(*args)
2014-10-14 17:29:57 INFO config-changed File "/var/lib/juju/agents/unit-neutron-api-0/charm/hooks/config-changed", line 122, in config_changed
2014-10-14 17:29:57 INFO config-changed do_openstack_upgrade(CONFIGS)
2014-10-14 17:29:57 INFO config-changed File "/var/lib/juju/agents/unit-neutron-api-0/charm/hooks/neutron_api_utils.py", line 213, in do_openstack_upgrade
2014-10-14 17:29:57 INFO config-changed migrate_neutron_database()
2014-10-14 17:29:57 INFO config-changed File "/var/lib/juju/agents/unit-neutron-api-0/charm/hooks/neutron_api_utils.py", line 227, in migrate_neutron_database
2014-10-14 17:29:57 INFO config-changed subprocess.check_output(cmd)
2014-10-14 17:29:57 INFO config-changed File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
2014-10-14 17:29:57 INFO config-changed raise CalledProcessError(retcode, cmd, output=output)
2014-10-14 17:29:57 INFO config-changed subprocess.CalledProcessError: Command '['neutron-db-manage', '--config-file', '/etc/neutron/neutron.conf', '--config-file', '/etc/neutron/plugins/ml2/ml2_conf.ini', 'upgrade', 'head']' returned non-zero exit status 1
2014-10-14 17:29:57 ERROR juju.worker.uniter uniter.go:486 hook failed: exit status 1

Running the db upgrade manually, I hit:

sqlalchemy.exc.OperationalError: (OperationalError) (1050, "Table 'agents' already exists") '\nCREATE TABLE agents (\n\tid VARCHAR(36) NOT NULL, \n\tagent_type VARCHAR(255) NOT NULL, \n\t`binary` VARCHAR(2
55) NOT NULL, \n\ttopic VARCHAR(255) NOT NULL, \n\thost VARCHAR(255) NOT NULL, \n\tadmin_state_up BOOL NOT NULL, \n\tcreated_at DATETIME NOT NULL, \n\tstarted_at DATETIME NOT NULL, \n\theartbeat_timestamp
DATETIME NOT NULL, \n\tdescription VARCHAR(255), \n\tconfigurations VARCHAR(4095) NOT NULL, \n\tPRIMARY KEY (id), \n\tCHECK (admin_state_up IN (0, 1))\n)ENGINE=InnoDB\n\n' ()

But I'm not sure if that is the original error or not. Perhaps we're conflicting with the nova-cc db upgrade?

Tags: openstack cts

Related branches

affects: ubuntu → nova-cloud-controller (Juju Charms Collection)
Changed in neutron-api (Juju Charms Collection):
assignee: nobody → Corey Bryant (corey.bryant)
tags: added: openstack
tags: added: cts
Changed in neutron-api (Juju Charms Collection):
status: New → In Progress
no longer affects: nova-cloud-controller (Juju Charms Collection)
Changed in neutron-api (Juju Charms Collection):
status: In Progress → Fix Committed
Changed in neutron-api (Juju Charms Collection):
status: Fix Committed → Fix Released
James Page (james-page)
no longer affects: neutron-api (Ubuntu)
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.