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 #36390 - Orphan cleanup on capsules #10554

Merged
merged 1 commit into from
May 31, 2023
Merged

Conversation

sjha4
Copy link
Member

@sjha4 sjha4 commented May 11, 2023

What are the changes introduced in this pull request?

Run pulp orphan cleanup after removing other records like unneeded repositories etc which create orphaned content of their own.
Run capsule orphan cleanup with orphan_protection_time as 0.

Considerations taken when implementing this change?

What are the testing steps for this pull request?

Set up a capsule assigned to Default organization that also has some repo content (Synced with immediate download policy)
Sync.
Notice files in /var/lib/pulp/media/artifact//
Remove Default Organization from the capsule and run bundle exec rails katello:delete_orphaned_content
Notice files in /var/lib/pulp/media/artifact// . It should be empty since all the downloaded content is orphaned.

@theforeman-bot
Copy link

Issues: #36390

@sjha4
Copy link
Member Author

sjha4 commented May 11, 2023

[test katello]

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.

Should we address this comment too? https://bugzilla.redhat.com/show_bug.cgi?id=2043089#c5

"I would also update the description of the parameter from " Time in minutes to consider orphan content as orphaned." to "Time in minutes before content not contained within a repo nor recently touched will be considered as orphaned"

The existing description doesn't really capture what is going on."

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.

Working well! Just one note:

lib/katello/plugin.rb Outdated Show resolved Hide resolved
@sjha4 sjha4 merged commit 0c6298a into Katello:master May 31, 2023
5 checks passed
wbclark pushed a commit to wbclark/katello that referenced this pull request Jun 6, 2023
wbclark pushed a commit that referenced this pull request Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants