Unclear error message if database has not been initialized

Bug #1157347 reported by Lorin Hochstein
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Glance
Won't Fix
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
Lorin Hochstein (lorinh)
summary: - Confusing error messages if database has not been initialized
+ Unclear error message if database has not been initialized
tags: added: ops
description: updated
Revision history for this message
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)
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
Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

Marking as Won't Fix as registry is now removed from glance code base.

Changed in glance:
status: Incomplete → Won't Fix
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.