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

delete published rpms from the cache #2133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

delete published rpms from the cache #2133

wants to merge 1 commit into from

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Sep 20, 2024

No description provided.

@@ -9,3 +9,5 @@

# Publish the repo - stderr/out redirect is required to stop the noninteractive shell from hanging
rsync --recursive --times --verbose --one-file-system --delete-after <%= @home %>/rsync_cache/$PROJECT/$RELEASE <%= @yum_directory %>/$PROJECT/ 2>&1 >/dev/null ;
# Cleanup - no need to keep the rpms
find <%= @home %>/rsync_cache/$PROJECT/$RELEASE -iname '*.rpm' -delete || true
Copy link
Member Author

Choose a reason for hiding this comment

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

this is taken from the Debian cleanup. technically we could also yank the whole folder here with an rm -rf, what's you preference?

Copy link
Member

Choose a reason for hiding this comment

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

I would have thought we do not delete the cache so that we do not have to re-sync things that have already been synced and saved time and cost.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, today I had to delete things to be able to upload new things.
Like, there was a full 3.9 that we never will publish again in the cache.

Copy link
Member

Choose a reason for hiding this comment

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

Should it become part of retiring a release? Make it part of a procedure?

Copy link
Member Author

Choose a reason for hiding this comment

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

It certainly could, even tho I don't like that too much as such things tend to get forgotten.

@ehelms
Copy link
Member

ehelms commented Sep 21, 2024 via email

@ekohl
Copy link
Member

ekohl commented Sep 21, 2024

Could we use rsync --link-dest to create hard links? Since the normal repos don't remove files, the cache shouldn't use additional space.

@evgeni
Copy link
Member Author

evgeni commented Sep 21, 2024

Today the cache and the repos are on different partitions, so hardlinks wouldn't work. But we could change that.

Cronjob is probably easier?

@ekohl
Copy link
Member

ekohl commented Sep 21, 2024

I'd like to change that since it's less IO, making it faster

@ekohl
Copy link
Member

ekohl commented Oct 7, 2024

Getting back to this: I think we should use hardlinks (which implies moving over the cache location, but already makes it much faster). Then the cache essentially becomes free because we never delete production RPMs. However, we don't want to modify any release RPM so we need to be careful that rsync to the cache never modifies files.

Then when we retire a release we should clean up the cache for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants