db sync command should give user friendly message for invalid 'version' specified
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Low
|
Dinesh Bhor | ||
Glance |
In Progress
|
Low
|
Dinesh Bhor | ||
OpenStack Compute (nova) |
In Progress
|
Low
|
Dinesh Bhor | ||
OpenStack Identity (keystone) |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
db sync command should give user friendly message for invalid 'version' specified
The command:
$ nova-manage db sync 111111111111111
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/
2016-02-16 01:54:53.908 TRACE nova sys.exit(main())
2016-02-16 01:54:53.908 TRACE nova File "/opt/stack/
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/
2016-02-16 01:54:53.908 TRACE nova return migration.
2016-02-16 01:54:53.908 TRACE nova File "/opt/stack/
2016-02-16 01:54:53.908 TRACE nova return IMPL.db_
2016-02-16 01:54:53.908 TRACE nova File "/opt/stack/
2016-02-16 01:54:53.908 TRACE nova version)
2016-02-16 01:54:53.908 TRACE nova File "/usr/local/
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-
2016-02-16 01:54:53.908 TRACE nova File "/usr/local/
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/
2016-02-16 01:54:53.908 TRACE nova changeset = schema.
2016-02-16 01:54:53.908 TRACE nova File "/usr/local/
2016-02-16 01:54:53.908 TRACE nova changeset = self.repository
2016-02-16 01:54:53.908 TRACE nova File "/usr/local/
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/
2016-02-16 02:06:15.045 TRACE nova sys.exit(main())
2016-02-16 02:06:15.045 TRACE nova File "/opt/stack/
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/
2016-02-16 02:06:15.045 TRACE nova return migration.
2016-02-16 02:06:15.045 TRACE nova File "/opt/stack/
2016-02-16 02:06:15.045 TRACE nova return IMPL.db_
2016-02-16 02:06:15.045 TRACE nova File "/opt/stack/
2016-02-16 02:06:15.045 TRACE nova version)
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/
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-
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/
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/
2016-02-16 02:06:15.045 TRACE nova changeset = schema.
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/
2016-02-16 02:06:15.045 TRACE nova changeset = self.repository
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/
2016-02-16 02:06:15.045 TRACE nova changes = [self.version(
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/
2016-02-16 02:06:15.045 TRACE nova return self.versions.
2016-02-16 02:06:15.045 TRACE nova File "/usr/local/
2016-02-16 02:06:15.045 TRACE nova return self.versions[
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/
2016-02-17 00:47:20.287 TRACE nova sys.exit(main())
2016-02-17 00:47:20.287 TRACE nova File "/opt/stack/
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/
2016-02-17 00:47:20.287 TRACE nova return migration.
2016-02-17 00:47:20.287 TRACE nova File "/opt/stack/
2016-02-17 00:47:20.287 TRACE nova return IMPL.db_
2016-02-17 00:47:20.287 TRACE nova File "/opt/stack/
2016-02-17 00:47:20.287 TRACE nova raise exception.
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.
Changed in nova: | |
assignee: | nobody → Dinesh Bhor (dinesh-bhor) |
Changed in keystone: | |
assignee: | nobody → Dinesh Bhor (dinesh-bhor) |
Changed in glance: | |
assignee: | nobody → Dinesh Bhor (dinesh-bhor) |
Changed in cinder: | |
assignee: | nobody → Dinesh Bhor (dinesh-bhor) |
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Low |
tags: | added: nova-manage |
Changed in keystone: | |
status: | New → Confirmed |
importance: | Undecided → Low |
Changed in keystone: | |
importance: | Low → Wishlist |
Changed in glance: | |
importance: | Undecided → Low |
Changed in keystone: | |
status: | In Progress → Confirmed |
Changed in keystone: | |
status: | Confirmed → Incomplete |
assignee: | Srushti Gadadare (srushti-gadadare) → nobody |
Changed in keystone: | |
status: | Incomplete → Opinion |
Changed in cinder: | |
status: | In Progress → Fix Released |
I could see this issue in cinder
root@sheelrana- VirtualBox: /home/sheelrana /cross_ project/ openstack- specs# cinder-manage db sync 4324234234
2016-02-17 15:17:13.147 CRITICAL cinder [-] MemoryError
2016-02-17 15:17:13.147 TRACE cinder Traceback (most recent call last): bin/cinder- manage" , line 10, in <module> cinder/ cinder/ cmd/manage. py", line 575, in main cinder/ cinder/ cmd/manage. py", line 214, in sync db_sync( version) cinder/ cinder/ db/migration. py", line 61, in db_sync init_version) lib/python2. 7/dist- packages/ oslo_db/ sqlalchemy/ migration. py", line 79, in db_sync api.upgrade( engine, repository, version) lib/python2. 7/dist- packages/ migrate/ versioning/ api.py" , line 186, in upgrade gen-15> ", line 2, in _migrate lib/python2. 7/dist- packages/ migrate/ versioning/ util/__ init__. py", line 160, in with_engine lib/python2. 7/dist- packages/ migrate/ versioning/ api.py" , line 345, in _migrate changeset( version) lib/python2. 7/dist- packages/ migrate/ versioning/ schema. py", line 82, in changeset .changeset( database, start_ver, version) lib/python2. 7/dist- packages/ migrate/ versioning/ repository. py", line 224, in changeset
2016-02-17 15:17:13.147 TRACE cinder File "/usr/local/
2016-02-17 15:17:13.147 TRACE cinder sys.exit(main())
2016-02-17 15:17:13.147 TRACE cinder File "/opt/stack/
2016-02-17 15:17:13.147 TRACE cinder fn(*fn_args)
2016-02-17 15:17:13.147 TRACE cinder File "/opt/stack/
2016-02-17 15:17:13.147 TRACE cinder return db_migration.
2016-02-17 15:17:13.147 TRACE cinder File "/opt/stack/
2016-02-17 15:17:13.147 TRACE cinder init_version=
2016-02-17 15:17:13.147 TRACE cinder File "/usr/local/
2016-02-17 15:17:13.147 TRACE cinder migration = versioning_
2016-02-17 15:17:13.147 TRACE cinder File "/usr/local/
2016-02-17 15:17:13.147 TRACE cinder return _migrate(url, repository, version, upgrade=True, err=err, **opts)
2016-02-17 15:17:13.147 TRACE cinder File "<decorator-
2016-02-17 15:17:13.147 TRACE cinder File "/usr/local/
2016-02-17 15:17:13.147 TRACE cinder return f(*a, **kw)
2016-02-17 15:17:13.147 TRACE cinder File "/usr/local/
2016-02-17 15:17:13.147 TRACE cinder changeset = schema.
2016-02-17 15:17:13.147 TRACE cinder File "/usr/local/
2016-02-17 15:17:13.147 TRACE cinder changeset = self.repository
2016-02-17 15:17:13.147 TRACE cinder File "/usr/local/
2016-02-17 15:17:13.147 TRACE cinder versions = range(int(start) + range_mod, int(end) + range_mod, step)
2016-02-17 15:17:13.147 TRACE cinder MemoryError
2016-02-17 15:17:13.147 TRACE cinder