yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #65238
[Bug 1546441] Re: db sync command should give user friendly message for invalid 'version' specified
** Changed in: cinder
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1546441
Title:
db sync command should give user friendly message for invalid
'version' specified
Status in Cinder:
Fix Released
Status in Glance:
In Progress
Status in OpenStack Identity (keystone):
Opinion
Status in OpenStack Compute (nova):
In Progress
Bug description:
db sync command should give user friendly message for invalid
'version' specified
The command:
$ nova-manage db sync
11111111111111111111111111111111111111111111111111
LOG:
2016-02-16 01:54:53.908 CRITICAL nova [-] OverflowError: range()
result has too many items
2016-02-16 01:54:53.908 TRACE nova Traceback (most recent call last):
2016-02-16 01:54:53.908 TRACE nova File "/usr/local/bin/nova-manage", line 10, in <module>
2016-02-16 01:54:53.908 TRACE nova sys.exit(main())
2016-02-16 01:54:53.908 TRACE nova File "/opt/stack/nova/nova/cmd/manage.py", line 1448, in main
2016-02-16 01:54:53.908 TRACE nova ret = fn(*fn_args, **fn_kwargs)
2016-02-16 01:54:53.908 TRACE nova File "/opt/stack/nova/nova/cmd/manage.py", line 932, in sync
2016-02-16 01:54:53.908 TRACE nova return migration.db_sync(version)
2016-02-16 01:54:53.908 TRACE nova File "/opt/stack/nova/nova/db/migration.py", line 26, in db_sync
2016-02-16 01:54:53.908 TRACE nova return IMPL.db_sync(version=version, database=database)
2016-02-16 01:54:53.908 TRACE nova File "/opt/stack/nova/nova/db/sqlalchemy/migration.py", line 57, in db_sync
2016-02-16 01:54:53.908 TRACE nova version)
2016-02-16 01:54:53.908 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line 186, in upgrade
2016-02-16 01:54:53.908 TRACE nova return _migrate(url, repository, version, upgrade=True, err=err, **opts)
2016-02-16 01:54:53.908 TRACE nova File "<decorator-gen-15>", line 2, in _migrate
2016-02-16 01:54:53.908 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 160, in with_engine
2016-02-16 01:54:53.908 TRACE nova return f(*a, **kw)
2016-02-16 01:54:53.908 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line 345, in _migrate
2016-02-16 01:54:53.908 TRACE nova changeset = schema.changeset(version)
2016-02-16 01:54:53.908 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 82, in changeset
2016-02-16 01:54:53.908 TRACE nova changeset = self.repository.changeset(database, start_ver, version)
2016-02-16 01:54:53.908 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/repository.py", line 224, in changeset
2016-02-16 01:54:53.908 TRACE nova versions = range(int(start) + range_mod, int(end) + range_mod, step)
2016-02-16 01:54:53.908 TRACE nova OverflowError: range() result has too many items
2016-02-16 01:54:53.908 TRACE nova
The command:
$ nova-manage db sync 2147483
LOG:
CRITICAL nova [-] KeyError: <VerNum(315)>
2016-02-16 02:06:15.045 TRACE nova Traceback (most recent call last):
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/bin/nova-manage", line 10, in <module>
2016-02-16 02:06:15.045 TRACE nova sys.exit(main())
2016-02-16 02:06:15.045 TRACE nova File "/opt/stack/nova/nova/cmd/manage.py", line 1448, in main
2016-02-16 02:06:15.045 TRACE nova ret = fn(*fn_args, **fn_kwargs)
2016-02-16 02:06:15.045 TRACE nova File "/opt/stack/nova/nova/cmd/manage.py", line 932, in sync
2016-02-16 02:06:15.045 TRACE nova return migration.db_sync(version)
2016-02-16 02:06:15.045 TRACE nova File "/opt/stack/nova/nova/db/migration.py", line 26, in db_sync
2016-02-16 02:06:15.045 TRACE nova return IMPL.db_sync(version=version, database=database)
2016-02-16 02:06:15.045 TRACE nova File "/opt/stack/nova/nova/db/sqlalchemy/migration.py", line 57, in db_sync
2016-02-16 02:06:15.045 TRACE nova version)
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line 186, in upgrade
2016-02-16 02:06:15.045 TRACE nova return _migrate(url, repository, version, upgrade=True, err=err, **opts)
2016-02-16 02:06:15.045 TRACE nova File "<decorator-gen-15>", line 2, in _migrate
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 160, in with_engine
2016-02-16 02:06:15.045 TRACE nova return f(*a, **kw)
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line 345, in _migrate
2016-02-16 02:06:15.045 TRACE nova changeset = schema.changeset(version)
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 82, in changeset
2016-02-16 02:06:15.045 TRACE nova changeset = self.repository.changeset(database, start_ver, version)
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/repository.py", line 225, in changeset
2016-02-16 02:06:15.045 TRACE nova changes = [self.version(v).script(database, op) for v in versions]
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/repository.py", line 189, in version
2016-02-16 02:06:15.045 TRACE nova return self.versions.version(*p, **k)
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/version.py", line 163, in version
2016-02-16 02:06:15.045 TRACE nova return self.versions[VerNum(vernum)]
2016-02-16 02:06:15.045 TRACE nova KeyError: <VerNum(315)>
2016-02-16 02:06:15.045 TRACE nova
The command:
$ nova-manage db sync something
LOG:
2016-02-17 00:47:20.287 CRITICAL nova [-] NovaException: version should be an integer
2016-02-17 00:47:20.287 TRACE nova Traceback (most recent call last):
2016-02-17 00:47:20.287 TRACE nova File "/usr/local/bin/nova-manage", line 10, in <module>
2016-02-17 00:47:20.287 TRACE nova sys.exit(main())
2016-02-17 00:47:20.287 TRACE nova File "/opt/stack/nova/nova/cmd/manage.py", line 1448, in main
2016-02-17 00:47:20.287 TRACE nova ret = fn(*fn_args, **fn_kwargs)
2016-02-17 00:47:20.287 TRACE nova File "/opt/stack/nova/nova/cmd/manage.py", line 932, in sync
2016-02-17 00:47:20.287 TRACE nova return migration.db_sync(version)
2016-02-17 00:47:20.287 TRACE nova File "/opt/stack/nova/nova/db/migration.py", line 26, in db_sync
2016-02-17 00:47:20.287 TRACE nova return IMPL.db_sync(version=version, database=database)
2016-02-17 00:47:20.287 TRACE nova File "/opt/stack/nova/nova/db/sqlalchemy/migration.py", line 51, in db_sync
2016-02-17 00:47:20.287 TRACE nova raise exception.NovaException(_("version should be an integer"))
2016-02-17 00:47:20.287 TRACE nova NovaException: version should be an integer
2016-02-17 00:47:20.287 TRACE nova
Same issues are present in glance, cinder and keystone also.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1546441/+subscriptions
References