logging a warning when someone accesses / seems unnecessary and wasteful

Bug #1496138 reported by Matt Fischer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Erno Kuvaja
Kilo
New
Undecided
Unassigned

Bug Description

Our load balancer health checks (and other folks too) just load the main glance URL and look for an http status of 300 to determine if glance is okay. Starting I think in Kilo, glance changed and now logs a warning. This is highly unnecessary and ends up generating gigs of useless logs which make diagnosing real issues more difficult.

At the least this should be an INFO, but ideally there's no point in logging this at all.

2015-08-04 17:42:43.058 24075 WARNING glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices.
2015-08-04 17:42:43.577 24071 WARNING glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices.
2015-08-04 17:42:45.083 24076 WARNING glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices.
2015-08-04 17:42:45.317 24064 WARNING glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices.
2015-08-04 17:42:47.092 24074 WARNING glance.api.middleware.version_negotiation [-] Unknown version. Returning version choices.

Erno Kuvaja (jokke)
Changed in glance:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Erno Kuvaja (jokke)
Revision history for this message
Kairat Kushaev (kkushaev) wrote :

I've met this before.
It seems that your health checkers returns request versions with the following path: '/'. Starting from kilo, version negotiator considers this as multiple choices request cause it doesn't know which version you are requesting.
In the current implementation glance have a special request '/versions' to return all available versions in glance.
As a possible workaround I would recommend to change the health check request to /versions.

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

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

Changed in glance:
status: Triaged → In Progress
Revision history for this message
Matt Fischer (mfisch) wrote :

Thanks for the work around. We checked / because we don't want to specify a version that may go away in the future. Keystone also returns 300 when checking / but doesn't throw a warning. We will switch to your work around and then remove it when the fix lands. Thanks.

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

Reviewed: https://review.openstack.org/224011
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=3730d855ece4ade24bbb29dea39aae18462f0f42
Submitter: Jenkins
Branch: master

commit 3730d855ece4ade24bbb29dea39aae18462f0f42
Author: Erno Kuvaja <email address hidden>
Date: Wed Sep 16 10:01:41 2015 +0000

    Remove WARN log message from version_negotiation

    After this version_negotiation logs only Debug messages when / gets
    requested.

    Closes-Bug: #1496138

    Change-Id: I99035679ec4faa3144507a844157fc37eb71c275

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-rc1 → 11.0.0
no longer affects: glance/liberty
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.