ironic-api does not record URI access logs

Bug #1536828 reported by aeva black
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
aeva black

Bug Description

Prior to commit c4bd20ebd4b42201bf40e00d4f0a1b2c69d2e931 the ironic-api service would print access records for every incoming request, such as:

127.0.0.1 - - [21/Jan/2016 14:44:45] "GET /v1/nodes HTTP/1.1" 200 378
127.0.0.1 - - [21/Jan/2016 14:45:02] "GET /v1/nodes/b487afd1-0ae3-4c96-8304-8eebd490e8e7 HTTP/1.1" 200 1050

After commit c4bd20ebd4b42201bf40e00d4f0a1b2c69d2e931 the ironic-api service ceases to log these access requests.

Tags: api
aeva black (tenbrae)
Changed in ironic:
status: New → Triaged
importance: Undecided → High
Revision history for this message
aeva black (tenbrae) wrote :

I've confirmed that this also affects the upstream gate - look at the logs for any API service and you'll see there are no access logs. Eg,

http://logs.openstack.org/86/270986/1/check/gate-tempest-dsvm-ironic-pxe_ipa/dc47357/logs/screen-ir-api.txt.gz#_2016-01-21_20_58_19_369

It seems to be fixed by changing the 'logger_name' passed to oslo_service.wsgi.Server. I'll post a patch shortly.

https://github.com/openstack/oslo.service/blob/master/oslo_service/wsgi.py#L105

I have also updated the Importance to High because API service access logs are required for a number of reasons, and while this doesn't affect the service uptime, it affects operators.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/271084

Changed in ironic:
assignee: nobody → Devananda van der Veen (devananda)
status: Triaged → In Progress
Changed in ironic:
assignee: Devananda van der Veen (devananda) → Anton Arefiev (aarefiev)
Changed in ironic:
assignee: Anton Arefiev (aarefiev) → Devananda van der Veen (devananda)
Dmitry Tantsur (divius)
tags: added: api
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/271084
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=2173649d483d1b8e7c734c841aa0b9daf970be2a
Submitter: Jenkins
Branch: master

commit 2173649d483d1b8e7c734c841aa0b9daf970be2a
Author: Devananda van der Veen <email address hidden>
Date: Thu Jan 21 15:27:07 2016 -0800

    API service logs access requests again

    The API service used to log access requests, as is customary for API
    services. However, commit c4bd20ebd4b42201bf40e00d4f0a1b2c69d2e931
    unintentionally changed this behavior when changing over to use
    oslo_service.

    This commit causes ironic-api to resume logging access requests, now
    with all the additional information that oslo_service provides, by
    changing the logger_name to the service name (instead of the default,
    which was being filtered out).

    Change-Id: I5855d4d2bd9eb70bf5f77fb2dc8c712f74304a07
    Closes-bug: #1536828

Changed in ironic:
status: In Progress → Fix Released
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.