Unclear error message if database has not been initialized

Bug #1157347 reported by Lorin Hochstein on 2013-03-19
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Glance
Low
Unassigned
glance (openSUSE)
New
Undecided
Unassigned

Bug Description

Error condition: A "glance" database has been created, and the correct credentials are in /etc/glance/glance-*.conf files, but "glance_mange version_control 0" and "glance_manage db_sync" have not yet been run.

When a user does a "glance index", then the glance-api.log will contain this trace, suggesting an error in glance-registry

2013-03-19 14:09:14 ERROR glance.registry.client [f8bb7547-2c91-4ae7-9d02-ded5fb07ebe0 8a44600ac8c6402fb781584022ceeb91 8283efb2e53d46e1a6bdbb2bdef9cb9a] Registry request GET /images/detail Exception
2013-03-19 14:09:14 29229 TRACE glance.registry.client Traceback (most recent call last):
2013-03-19 14:09:14 29229 TRACE glance.registry.client File "/usr/lib/python2.7/dist-packages/glance/registry/client.py", line 89, in do_request
2013-03-19 14:09:14 29229 TRACE glance.registry.client action, **kwargs)
2013-03-19 14:09:14 29229 TRACE glance.registry.client File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 63, in wrapped
2013-03-19 14:09:14 29229 TRACE glance.registry.client return func(self, *args, **kwargs)
2013-03-19 14:09:14 29229 TRACE glance.registry.client File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 444, in do_request
2013-03-19 14:09:14 29229 TRACE glance.registry.client headers=headers)
2013-03-19 14:09:14 29229 TRACE glance.registry.client File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 80, in wrapped
2013-03-19 14:09:14 29229 TRACE glance.registry.client return func(self, method, url, body, headers)
2013-03-19 14:09:14 29229 TRACE glance.registry.client File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 581, in _do_request
2013-03-19 14:09:14 29229 TRACE glance.registry.client raise exception.ServerError()
2013-03-19 14:09:14 29229 TRACE glance.registry.client ServerError: The request returned 500 Internal Server Error.

However, /var/log/glance/registry.log will not contain any information about the nature of the error.

It would help admins if the glance-registry did a check for this and outputted a meaningful error message to its log.

This was tested against folsom on Ubuntu 12.04 (cloud archive).

Tags: ops Edit Tag help
Lorin Hochstein (lorinh) on 2013-03-19
summary: - Confusing error messages if database has not been initialized
+ Unclear error message if database has not been initialized
tags: added: ops
description: updated
Pixy Yuan (pixy-bupt) wrote :

This information really helps me!

Changed in glance:
assignee: nobody → Pixy Yuan (pixy-bupt)
assignee: Pixy Yuan (pixy-bupt) → nobody
status: New → Confirmed
Lee Li (lilinguo) on 2014-01-06
Changed in glance:
assignee: nobody → Lee Li (lilinguo)
Changed in glance:
importance: Undecided → Low
Changed in glance:
assignee: Lee Li (lilinguo) → nobody
status: Confirmed → Incomplete
Changed in glance:
assignee: nobody → Dharini Chandrasekar (dharini-chandrasekar)
Changed in glance:
assignee: Dharini Chandrasekar (dharini-chandrasekar) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers