Opened at 2013-03-01T03:07:37Z
Closed at 2020-10-30T12:35:44Z
#1927 closed defect (wontfix)
cloud backend spams twistd.log with two entries for each HTTP connection
Reported by: | davidsarah | Owned by: | daira |
---|---|---|---|
Priority: | normal | Milestone: | soon |
Component: | code-storage | Version: | cloud-branch |
Keywords: | twisted http logging cloud-backend | Cc: | |
Launchpad Bug: |
Description
This fills the twistd.log files with junk and makes it difficult to see more important log entries.
Change History (8)
comment:1 Changed at 2014-03-18T18:22:02Z by daira
- Keywords cloud-backend added
- Owner changed from davidsarah to daira
- Status changed from new to assigned
comment:2 Changed at 2014-03-18T18:22:44Z by daira
comment:3 Changed at 2014-03-18T18:23:37Z by daira
- Version changed from 1.9.2 to cloud-branch
comment:4 follow-up: ↓ 5 Changed at 2014-06-28T15:44:44Z by daira
This happened to a LeastAuthority customer server. The culprit appears to be the logging when the noisy attribute is set on an HTTPClientFactory, for example here in twisted/internet/protocol.py.
I think (but have no way to test from where I am now) that it can be fixed by changing this line in s3_container.py to:
query = Query(*args, **kwargs) if hasattr(query.factory, 'noisy'): query.factory.noisy = False return query
Note that this only changes the S3 container; other cloud containers also use HTTPClientFactory and will need changing.
comment:5 in reply to: ↑ 4 Changed at 2014-06-28T16:24:19Z by daira
Replying to daira:
I think (but have no way to test from where I am now) that it can be fixed by changing this line in s3_container.py to:
query = Query(*args, **kwargs) if hasattr(query.factory, 'noisy'): query.factory.noisy = False return query
Actually that won't quite work because that code is conditional on usertoken being not None (i.e. on DevPay being used). It would have to be made unconditional, or the noisy attribute reset to False in txAWS (just after here) instead.
comment:6 Changed at 2016-09-20T13:49:27Z by daira
It needs to be like this:
[...] endpoint = AWSServiceEndpoint(uri=url) def make_query(*args, **kwargs): if usertoken is not None: amz_headers = kwargs.get("amz_headers", {}) if producttoken is not None: amz_headers["security-token"] = (usertoken, producttoken) else: amz_headers["security-token"] = usertoken kwargs["amz_headers"] = amz_headers query = Query(*args, **kwargs) if hasattr(query.factory, 'noisy'): query.factory.noisy = False return query self.client = S3Client(creds=creds, endpoint=endpoint, query_factory=make_query) self.ServiceError = S3Error
comment:7 Changed at 2016-09-27T05:38:15Z by vu3rdd
I just incorporated it in a pull request here: https://github.com/tahoe-lafs/tahoe-lafs/pull/355
comment:8 Changed at 2020-10-30T12:35:44Z by exarkun
- Resolution set to wontfix
- Status changed from assigned to closed
The established line of development on the "cloud backend" branch has been abandoned. This ticket is being closed as part of a batch-ticket cleanup for "cloud backend"-related tickets.
If this is a bug, it is probably genuinely no longer relevant. The "cloud backend" branch is too large and unwieldy to ever be merged into the main line of development (particularly now that the Python 3 porting effort is significantly underway).
If this is a feature, it may be relevant to some future efforts - if they are sufficiently similar to the "cloud backend" effort - but I am still closing it because there are no immediate plans for a new development effort in such a direction.
Tickets related to the "leasedb" are included in this set because the "leasedb" code is in the "cloud backend" branch and fairly well intertwined with the "cloud backend". If there is interest in lease implementation change at some future time then that effort will essentially have to be restarted as well.
The twistd.log files can easily consume hundreds of megabytes due to this.