yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #08287
[Bug 1269701] [NEW] log message level is unreasonable
Public bug reported:
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?
** Affects: glance
Importance: Undecided
Assignee: Liusheng (liusheng)
Status: New
** Changed in: glance
Assignee: (unassigned) => Liusheng (liusheng)
--
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):
New
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
Follow ups
References