Skip to content

Delete old tagged images from Jenkins GPU worker#776

Merged
rosbo merged 1 commit into
masterfrom
delete-old-tagged-images-jenkins
Apr 14, 2020
Merged

Delete old tagged images from Jenkins GPU worker#776
rosbo merged 1 commit into
masterfrom
delete-old-tagged-images-jenkins

Conversation

@rosbo

@rosbo rosbo commented Apr 14, 2020

Copy link
Copy Markdown
Contributor

CPU Jenkins workers are ephemeral meaning they are recreated between each build.
GPU Jenkins workers are not, the GCP Jenkins plugin doesn't support GPU VMs well.

Every 2-3 weeks, the GPU builds would start failing because the disk has filled up.

We were already deleting dangling images (untagged). However, we were never deleting the old images with a tag (non-dangling). This meant that we kept the images from the last build for a given branch on the worker until the disk filled up causing failures.

The fix was to manually SSH to the GPU worker and run docker system prune -a -f when it happened when a build failure cause by the GPU worker disk filling occured.

With this PR, we won't have build anymore failing for this reason and we won't need to perform that manual SSH step.

BUG=129682568

@Philmod

Philmod commented Apr 14, 2020

Copy link
Copy Markdown
Contributor

Should we do the same on R side?

@rosbo rosbo requested a review from Philmod April 14, 2020 19:09
@rosbo

rosbo commented Apr 14, 2020

Copy link
Copy Markdown
Contributor Author

Not necessary, docker image prune doesn't support filtering by image so it will delete both the R and Python old images.

@Philmod

Philmod commented Apr 14, 2020

Copy link
Copy Markdown
Contributor

Not necessary, docker image prune doesn't support filtering by image so it will delete both the R and Python old images.

I was thinking about the very improbable case that there is no python builds but a ton of R's.

@rosbo

rosbo commented Apr 14, 2020

Copy link
Copy Markdown
Contributor Author

Quite improbable considering we automatically trigger builds for the master branch three times a week (Monday, Wednesday and Friday):
https://github.com/Kaggle/docker-python/blob/master/Jenkinsfile#L1

@rosbo rosbo merged commit 97b61ce into master Apr 14, 2020
@rosbo rosbo deleted the delete-old-tagged-images-jenkins branch April 14, 2020 20:05
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.

2 participants