Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #33924 - use new pulp orphans api #9787

Merged
merged 1 commit into from Nov 30, 2021
Merged

Conversation

jlsherrill
Copy link
Member

What are the changes introduced in this pull request?

adds a new setting to control cleanup time

  • this setting determines what is considered orphaned. By default 24 hours is used, and if a unit has been in use by a repo version in the last 24 hours, it will be cleaned up. Setting to zero causes it to be cleaned up immediately, but can cause issues on syncs iirc?
    uses new cleanup api

What is the thinking behind these changes?

Make it easier for users to customize the orphan cleanup time (especially devs who need it set to zero)

What are the testing steps for this pull request?

Sync some repository to pull down content.
check output of sudo -u postgres psql pulpcore -c ' select count(*) from core_content;'
Set orphan cleanup time to zero,
run orphan cleanup rake task 'rake katello:delete_orphaned_contentverify in journalctl -u pulpcore-api that there is no deprecation message check output ofsudo -u postgres psql pulpcore -c ' select count(*) from core_content;'`
content count should decrease

@theforeman-bot
Copy link

Issues: #33924

Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine for me! We just need some new VCR recordings.

---
pulp_tasks:
- pulp_href: "/pulp/api/v3/tasks/903e6659-6b2e-435a-92f3-21984688693b/"
  pulp_created: '2021-11-24T22:04:27.682+00:00'
  state: completed
  name: pulpcore.app.tasks.orphan.orphan_cleanup
  logging_cid: 9fe4004117cf4944b5b2625c84abc2e3
  started_at: '2021-11-24T22:04:27.749+00:00'
  finished_at: '2021-11-24T22:04:28.048+00:00'
  worker: "/pulp/api/v3/workers/596a934d-8a6d-4211-bcf5-515b510f653d/"
  child_tasks: []
  progress_reports:
  - message: Clean up orphan Artifacts
    code: clean-up.content
    state: completed
    total: 9
    done: 9
  - message: Clean up orphan Content
    code: clean-up.content
    state: completed
    total: 36
    done: 36
  created_resources: []
  reserved_resources_record: []
task_groups: []
poll_attempts:
  total: 1
  failed: 0

adds a new setting to control cleanup time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants