s3 middleware depends on swift

Bug #1178738 reported by Adam Young
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Kun Huang

Bug Description

The s3 middleware imports:

from swift.common import utils as swift_utils

This is used to initiate the logging:

https://github.com/openstack/keystone/blob/master/keystone/middleware/s3_token.py#L57
 self.logger = swift_utils.get_logger(conf, log_route='s3token')

howerver, python has a standard logging framework, and we should not be bypassing that. It is up to the project that imports the middleware to set up logging properly, not up to the middleware to conform to multiple projects.

THis requires two things: 1, on the swift side, set up the custom logging using the standard python mechanism, and 2 getting this middleware to use the python logging framework.

Revision history for this message
Adam Young (ayoung) wrote :

the other place swift utils is used in this file is:

 parts = swift_utils.split_path(req.path, 1, 4, True)

which can easily be replaced as well.

Revision history for this message
Dolph Mathews (dolph) wrote :

keystone.middleware.swift_auth depends on swift as well.

Changed in keystone:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
assignee: nobody → Kun Huang (academicgareth)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/38074
Committed: http://github.com/openstack/keystone/commit/55938e8b6048fe7138f4577ed276b81a52071db4
Submitter: Jenkins
Branch: master

commit 55938e8b6048fe7138f4577ed276b81a52071db4
Author: Kun Huang <email address hidden>
Date: Sun Jul 21 23:55:45 2013 +0800

    remove swift dependency of s3 middleware

    In middleware/s3_token.py, here only use swift for a logger and path
    split functionality. We should remove swift dependency by using new
    codes.

    fixes bug #1178738

    Change-Id: Icc2648720e220a873d1fb8e9961d777ceabef70b

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: havana-3 → 2013.2
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.