ceilomiddleware.swift ignore the swift_source in environ
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ceilometermiddleware |
Fix Released
|
Medium
|
Rohit Jaiswal |
Bug Description
swift_source indicates that the request originated inside Swift as a side-effect handling another request. Any non-empty string means its type. Values are usually short uppercase e.g., SW for StaticWeb, FP for FormPOST. A log with an empty string means the request being logged originated from an end user.
This means it double counts many user requests. If it’s more than 10 minutes since the last request, it’s probable that swift-proxy will perform a HEAD /v1/a1, then a HEAD /v1/a/c and *then* the GET /v1/a/c/o. So three messages are emitted. To the end user, it looks like they are being charged for three requests instead of one.
An example:
- User makes a GET request to /v1/a1/c1/
- Swift(swift-proxy) does a HEAD on /v1/a1 with swift_source=
- then GET on /v1/a1/c1 with swift_source=
- then does GET/v1/
- returns the content of the index.html file and then logs the request as:
- GET /v1/a1/c1 , with swift_source=None
So, 4 records in the log, only the final one should be metered and billable
Changed in ceilometermiddleware: | |
assignee: | nobody → Rohit Jaiswal (rohit-jaiswal-3) |
Changed in ceilometermiddleware: | |
importance: | Undecided → Medium |
Changed in ceilometermiddleware: | |
milestone: | none → 0.3.0 |
status: | Fix Committed → Fix Released |
i don't quite understand this, we generate (up to) 3 different items per request:
1. a request event
2. a incoming.bytes meter
3. a outgoing.bytes meter
are all three being captured 4 times? or just a subset?