066 migration get_network_by_id list index out of range

Bug #917812 reported by Johannes Erdfelt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Johannes Erdfelt

Bug Description

The 066 migration fails in some cases. I received this traceback while upgrading a development install:

2012-01-17 18:59:30,064 INFO nova [-] Updating 2e8b9130-1485-43e1-a077-98e0d9aca04c
2012-01-17 18:59:30,068 INFO nova [-] VIFs for Instance 2e8b9130-1485-43e1-a077-98e0d9aca04c:
 [{'network_id': None, 'address': '02:16:3e:46:c7:f0', 'id': 1L, 'uuid': '088b1308-b448-4150-8293-30c1847f1fed'}]
2012-01-17 18:59:30,073 DEBUG migrate.versioning.util [-] Disposing SQLAlchemy engine Engine(mysql://root:nova@127.0.0.1/nova) from (pid=23324) debug /home/johannes/openstack/nova/trunk/nova/log.py:175
Command failed, please check log for more info
2012-01-17 18:59:30,076 CRITICAL nova [-] list index out of range
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/home/johannes/openstack/nova/trunk/bin/nova-manage", line 2382, in <module>
(nova): TRACE: main()
(nova): TRACE: File "/home/johannes/openstack/nova/trunk/bin/nova-manage", line 2370, in main
(nova): TRACE: fn(*fn_args, **fn_kwargs)
(nova): TRACE: File "/home/johannes/openstack/nova/trunk/bin/nova-manage", line 1207, in sync
(nova): TRACE: return migration.db_sync(version)
(nova): TRACE: File "/home/johannes/openstack/nova/trunk/nova/db/migration.py", line 35, in db_sync
(nova): TRACE: return IMPL.db_sync(version=version)
(nova): TRACE: File "/home/johannes/openstack/nova/trunk/nova/db/sqlalchemy/migration.py", line 51, in db_sync
(nova): TRACE: return versioning_api.upgrade(FLAGS.sql_connection, repo_path, version)
(nova): TRACE: File "/usr/local/lib/python2.6/dist-packages/migrate/versioning/api.py", line 186, in upgrade
(nova): TRACE: return _migrate(url, repository, version, upgrade=True, err=err, **opts)
(nova): TRACE: File "<string>", line 2, in _migrate
(nova): TRACE: File "/usr/local/lib/python2.6/dist-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
(nova): TRACE: return f(*a, **kw)
(nova): TRACE: File "/usr/local/lib/python2.6/dist-packages/migrate/versioning/api.py", line 365, in _migrate
(nova): TRACE: schema.runchange(ver, change, changeset.step)
(nova): TRACE: File "/usr/local/lib/python2.6/dist-packages/migrate/versioning/schema.py", line 84, in runchange
(nova): TRACE: change.run(self.engine, step)
(nova): TRACE: File "/usr/local/lib/python2.6/dist-packages/migrate/versioning/script/py.py", line 145, in run
(nova): TRACE: script_func(engine)
(nova): TRACE: File "/home/johannes/openstack/nova/trunk/nova/db/sqlalchemy/migrate_repo/versions/066_preload_instance_info_cache_table.py", line 155, in upgrade
(nova): TRACE: network = get_network_by_id(vif['network_id'])[0]
(nova): TRACE: IndexError: list index out of range
(nova): TRACE:

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/3111

Changed in nova:
assignee: nobody → Johannes Erdfelt (johannes.erdfelt)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/3111
Committed: http://github.com/openstack/nova/commit/7397d8fc1dab0fed2a069af670f37f3002ae1d1d
Submitter: Jenkins
Branch: master

commit 7397d8fc1dab0fed2a069af670f37f3002ae1d1d
Author: Johannes Erdfelt <email address hidden>
Date: Tue Jan 17 19:28:34 2012 +0000

    Only update if there are networks to update

    Fixes bug 917812

    Change-Id: Ibb59e2ae634590fe57e777b720a84580c6ed64cc

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
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.