Project

General

Profile

Bug #14487

Task export should include successful tasks as well as the pending or errored one

Added by Bryan Kearney about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1314207
Description of problem:
Current behavior of foreman-debug, specifically task export might not be sufficient when we are looking for performance issues. I. e. if I can see error message: "[E] Required lock is already taken by other running tasks." and I need to check the actual task which had the locks and this task finished successfully, it will not be included later, when the foreman-debug performs task export script.

Version-Release number of selected component (if applicable):
Satellite 6.X

How reproducible:
Just run foreman-debug and look for successful tasks in the task export

Actual results:
Successful tasks are missing in the task export

Expected results:
Successful task will be included in the task export

Additional info:
Current implementation:

#foreman-tasks export
if hash foreman-rake 2>/dev/null; then
echo "Exporting tasks, this may take a few minutes."
tasks_filename=`foreman-rake foreman_tasks:export_tasks 2> /tmp/tasks_export.log | tail -n 1 | awk '{print $2}'`
copy_files $tasks_filename
add_files /tmp/tasks_export.log
fi

Proposed modification:
#foreman-tasks export
if hash foreman-rake 2>/dev/null; then
echo "Exporting tasks, this may take a few minutes."
tasks_filename=`foreman-rake foreman_tasks:export_tasks tasks=all days=14 2> /tmp/tasks_export.log | tail -n 1 | awk '{print $2}'`
copy_files $tasks_filename
add_files /tmp/tasks_export.log
fi

Because there might be a lot of tasks, I believe it will be good to limit the age of tasks included in the task export. Therefore I'm proposing 14 days as I think it should be more than sufficient.

Associated revisions

Revision 6ef3cf8a (diff)
Added by David Davis almost 7 years ago

Fixes #14487 - Export filtered tasks in csv format

During an upgrade, we need a way to check that there aren't any active
tasks so we can bail and notify the user. To this end, we're creating a
way to get a csv dump of tasks that can be filtered.

History

#1 Updated by Dominic Cleal about 7 years ago

  • Project changed from Foreman to Katello
  • Category deleted (foreman-debug)

#2 Updated by Eric Helms about 7 years ago

  • Project changed from Katello to foreman-tasks

#3 Updated by Ivan Necas about 7 years ago

  • Assignee changed from Ivan Necas to David Davis

#4 Updated by The Foreman Bot about 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-tasks/pull/186 added

#5 Updated by Anonymous almost 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF