Tasks are shown with "Started at = N/A" and "Duration = N/A"

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.x

Issue

Tasks are shown with "Started at = N/A" and "Duration = N/A", also not possible to clean them.

Resolution

Update missing records in database and clean them with regular cleaning task

# su - postgres -c "psql foreman -c \"update foreman_tasks_tasks set started_at = '1900-01-01' where started_at is null and state !='scheduled';\""
# foreman-rake foreman_tasks:cleanup TASK_SEARCH='label ~ *' AFTER='30d' VERBOSE=true

For more KB articles/solutions related to Red Hat Satellite 6.x Satellite Tasking System Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Satellite Tasking System Issues

Root Cause

At specific conditions can be tasks created with started_at value null

Diagnostic Steps

Check for the tasks without started_at value, please note to exclude tasks in state scheduled for which started_at should be null.

# su - postgres -c "psql foreman -c \"select count(*) from foreman_tasks_tasks where started_at is null and state !='scheduled';\""
SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.