yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #08310
[Bug 1269701] Re: log message level is unreasonable
** Changed in: glance
Status: New => Invalid
** Changed in: glance
Assignee: Liusheng (liusheng) => (unassigned)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1269701
Title:
log message level is unreasonable
Status in OpenStack Image Registry and Delivery Service (Glance):
Invalid
Bug description:
In method glance.api.v1.images.Controller#_reserve, if an duplicate image uuid is specified, it will log the "debug" level message and raise error:
except exception.Duplicate:
msg = (_("An image with identifier %s already exists") %
image_meta['id'])
LOG.debug(msg)
raise HTTPConflict(explanation=msg,
In method glance.registry.api.v1.images.Controller#create,in the same case, glance will log the "error" level message and return error:
except exception.Duplicate:
msg = _("Image with identifier %s already exists!") % image_id
LOG.error(msg)
return exc.HTTPConflict(msg)
I think it should log error message when raise or return exceptions.
there are many similar cases in glance code.
is it a bug?
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1269701/+subscriptions
References