Project

General

Profile

Actions

Bug #37521

closed

Pulp never purge the completed tasks

Added by Ian Ballou 7 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2280509

Description of problem:
The completed Pulp tasks stay forever and never be purged by Pulp. For a busy environment, the number of completed tasks can easily reach millions of records.

Large tasks table may cause the following issues:

1. Large core_task table size (more than 10GB)
2. Affecting Pulp performance related to pulp task queries.

For example. we can see the following slow queries of core_task table in the database logs.
~~~
duration: 5173.306 ms statement: SELECT 1 AS "a" FROM "core_task" WHERE ("core_task"."pulp_created" < 'xxxxxxxxxxxxx'::timestamptz AND "core_task"."state" IN ('waiting', 'running', 'canceling') AND "core_task"."reserved_resources_record" && (ARRAY['/pulp/api/v3/domains/xxxxxxxxxxxxxxxxxxxxxxxxxxxx/', '/api/v3/distributions/', 'shared:/api/v3/distributions/'])::text[]) LIMIT 1

duration: 6680.679 ms statement: SELECT 1 AS "a" FROM "core_task" WHERE ("core_task"."pulp_created" < 'xxxxxxxxxxxxx'::timestamptz AND "core_task"."state" IN ('waiting', 'running', 'canceling') AND "core_task"."reserved_resources_record" && (ARRAY['/pulp/api/v3/domains/xxxxxxxxxxxxxxxxxxxxxxxxxxxx/', '/api/v3/distributions/', 'shared:/api/v3/distributions/'])::text[]) LIMIT 1
~~~

Additional info:
The workaround to use pulp command to purge the tasks.

E.g. the below command will purge the completed tasks older than 2 weeks.
~~
pulp --force task purge --finished-before $(date --date="$(date) 2 week" +%Y%m-%d) --state completed --state failed --state canceled
~~

Actions #1

Updated by Ian Ballou 7 months ago

  • Subject changed from Pulp never purge the completed tasks to Pulp never purge the completed tasks
  • Assignee set to Ian Ballou
  • Target version changed from Katello 4.15.0 to Katello 4.13.0
Actions #2

Updated by The Foreman Bot 7 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/11012 added
Actions #3

Updated by Partha Aji 7 months ago

  • Triaged changed from No to Yes
Actions #4

Updated by The Foreman Bot 6 months ago

  • Fixed in Releases Katello 4.14.0 added
Actions #5

Updated by Anonymous 6 months ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by The Foreman Bot 6 months ago

  • Pull request https://github.com/Katello/katello/pull/11051 added
Actions #7

Updated by The Foreman Bot 6 months ago

  • Fixed in Releases Katello 4.13.1 added
Actions

Also available in: Atom PDF