Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 887198 Details for
Bug 1086321
RFE: Add more aggressive removal option for retrace-server tasks with 'status == STATUS_FAIL' after X days
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Patch to add a new config variable and section to allow for more aggressive deletes of failed tasks
0001-Add-DeleteFailedTaskAfter-config-variable-and-sectio.patch (text/plain), 2.43 KB, created by
Dave Wysochanski
on 2014-04-17 14:14:45 UTC
(
hide
)
Description:
Patch to add a new config variable and section to allow for more aggressive deletes of failed tasks
Filename:
MIME Type:
Creator:
Dave Wysochanski
Created:
2014-04-17 14:14:45 UTC
Size:
2.43 KB
patch
obsolete
>From 5788e8ea12ce2cbefa8f2e56cc6e2d219f775012 Mon Sep 17 00:00:00 2001 >From: Dave Wysochanski <dwysocha@redhat.com> >Date: Thu, 17 Apr 2014 10:08:36 -0400 >Subject: [PATCH] Add 'DeleteFailedTaskAfter' config variable and section to retrace-server-cleanup > >Failed tasks often take up a significant amount of space due to the fact that >the task often gets submitted multiple times in hopes one time it will succeed. > >We don't want to keep failed tasks around for nearly as long as successful tasks >which are just old, so it makes sense to have a separate config variable and >section in the cleanup script. > >Tested on a development retrace-server system which had older failed tasks >by gradually lowering the value of DeleteFailedTaskAfter and repeatedly running >retrace-server-cleanup manually. > >Should fix https://bugzilla.redhat.com/show_bug.cgi?id=1086321 > >Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> >--- > src/lib/retrace.py | 1 + > src/retrace-server-cleanup | 18 ++++++++++++++++++ > 2 files changed, 19 insertions(+), 0 deletions(-) > >diff --git a/src/lib/retrace.py b/src/lib/retrace.py >index 2908ac0..ae98585 100644 >--- a/src/lib/retrace.py >+++ b/src/lib/retrace.py >@@ -141,6 +141,7 @@ CONFIG = { > "MaxUnpackedSize": 600, > "MinStorageLeft": 10240, > "DeleteTaskAfter": 120, >+ "DeleteFailedTaskAfter": 24, > "ArchiveTaskAfter": 0, > "KeepRawhideLatest": 3, > "KojiRoot": "/mnt/koji", >diff --git a/src/retrace-server-cleanup b/src/retrace-server-cleanup >index 378f836..44b52b2 100755 >--- a/src/retrace-server-cleanup >+++ b/src/retrace-server-cleanup >@@ -123,3 +123,21 @@ if __name__ == "__main__": > if task.get_age() >= CONFIG["DeleteTaskAfter"]: > log.write("Deleting old task %s\n" % filename) > task.remove() >+ >+ if CONFIG["DeleteFailedTaskAfter"] > 0: >+ # clean up old failed tasks >+ try: >+ files = os.listdir(CONFIG["SaveDir"]) >+ except OSError, ex: >+ files = [] >+ log.write("Error listing task directory: %s\n" % ex) >+ >+ for filename in files: >+ try: >+ task = RetraceTask(filename) >+ except: >+ continue >+ >+ if task.get_age() >= CONFIG["DeleteFailedTaskAfter"] and task.get_status() == STATUS_FAIL: >+ log.write("Deleting old failed task %s\n" % filename) >+ task.remove() >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1086321
: 887198