<div dir="ltr"><div><div><font>Hi, All:<br></font></div><font> When I checkout nova to another branch. how to confirm I have the right database schema ?<br></font></div><font> When I run "nova-manage db sync", I've got below error:<br>
</font><div><div><div><div><div><font><br>2014-06-11 22:53:27.977 CRITICAL nova [-] KeyError: <VerNum(242)><br><br>2014-06-11 22:53:27.977 TRACE nova Traceback (most recent call last):<br>2014-06-11 22:53:27.977 TRACE nova File "/usr/local/bin/nova-manage", line 10, in <module><br>
2014-06-11 22:53:27.977 TRACE nova sys.exit(main())<br>2014-06-11 22:53:27.977 TRACE nova File "/opt/stack/nova/nova/cmd/manage.py", line 1376, in main<br>2014-06-11 22:53:27.977 TRACE nova ret = fn(*fn_args, **fn_kwargs)<br>
2014-06-11 22:53:27.977 TRACE nova File "/opt/stack/nova/nova/cmd/manage.py", line 885, in sync<br>2014-06-11 22:53:27.977 TRACE nova return migration.db_sync(version)<br>2014-06-11 22:53:27.977 TRACE nova File "/opt/stack/nova/nova/db/migration.py", line 32, in db_sync<br>
2014-06-11 22:53:27.977 TRACE nova return IMPL.db_sync(version=version)<br>2014-06-11 22:53:27.977 TRACE nova File "/opt/stack/nova/nova/db/sqlalchemy/migration.py", line 44, in db_sync<br>2014-06-11 22:53:27.977 TRACE nova return versioning_api.upgrade(get_engine(), repository, version)<br>
2014-06-11 22:53:27.977 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line 186, in upgrade<br>2014-06-11 22:53:27.977 TRACE nova return _migrate(url, repository, version, upgrade=True, err=err, **opts)<br>
2014-06-11 22:53:27.977 TRACE nova File "<string>", line 2, in _migrate<br>2014-06-11 22:53:27.977 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 160, in with_engine<br>
2014-06-11 22:53:27.977 TRACE nova return f(*a, **kw)<br>2014-06-11 22:53:27.977 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line 345, in _migrate<br>2014-06-11 22:53:27.977 TRACE nova changeset = schema.changeset(version)<br>
2014-06-11 22:53:27.977 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 82, in changeset<br>2014-06-11 22:53:27.977 TRACE nova changeset = self.repository.changeset(database, start_ver, version)<br>
2014-06-11 22:53:27.977 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/repository.py", line 225, in changeset<br>2014-06-11 22:53:27.977 TRACE nova changes = [self.version(v).script(database, op) for v in versions]<br>
2014-06-11 22:53:27.977 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/repository.py", line 189, in version<br>2014-06-11 22:53:27.977 TRACE nova return self.versions.version(*p, **k)<br>
2014-06-11 22:53:27.977 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/version.py", line 173, in version<br>2014-06-11 22:53:27.977 TRACE nova return self.versions[VerNum(vernum)]<br>
2014-06-11 22:53:27.977 TRACE nova KeyError: <VerNum(242)><br>2014-06-11 22:53:27.977 TRACE nova <br></font><br><br clear="all"><div><div dir="ltr"><div><font face="comic sans ms, sans-serif" size="4"><b><i>Best Regards!</i></b></font></div>
<font face="comic sans ms, sans-serif" size="4"><b><i>Chao Yan<br><font>--------------<br></font></i></b></font><font face="comic sans ms, sans-serif" size="4"><b><i><font>My twitter:Andy Yan <a href="https://twitter.com/yanchao727" target="_blank">@yanchao727</a></font></i></b></font><br>
<font face="comic sans ms, sans-serif" size="4"><b><i><font>My Weibo:<a href="http://weibo.com/herewearenow" target="_blank">http://weibo.com/herewearenow</a><br>--------------</font><br></i></b></font></div></div>
</div></div></div></div></div></div>