-
Notifications
You must be signed in to change notification settings - Fork 883
rkt: image gc: garbage-collect images from the store #1697
Conversation
57550c1
to
1316e41
Compare
I have a couple of questions for this:
cc @robszumski |
I think the flag name needs to hint more at what it does. It seems like this should just the the default behavior, right? How is this different than the grace period flag? I also don't see any docs that explain how to use this, hence my questions. For an "in the wild" example, the https://github.com/spotify/docker-gc container uses a much tighter timeframe of 1 hour. |
The grace period flag belongs to I'll add some documentation. Thanks! |
1bf9cf5
to
1222505
Compare
Updated |
LGTM on docs |
1222505
to
4b22119
Compare
@@ -90,6 +81,26 @@ func runRmImage(cmd *cobra.Command, args []string) (exit int) { | |||
if errors > 0 { | |||
stderr("rkt: %d image(s) cannot be removed", errors) | |||
} | |||
return fmt.Errorf("error(s) found while removing images") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this message be prepended with rkt:
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's an error I'm returning, I leave that to the caller.
But yeah, None of the callers were adding rkt:
so I'll change that.
Some nits, otherwise LFAD. |
We need it for garbage collecting images.
This commit makes rkt image gc remove images from the store apart from unreferenced treestores. By default, images not used in the last 24h will be removed. This can be configured with the `--grace-period`.
4b22119
to
3769703
Compare
LFAD. |
But let's wait for green first. |
rkt: image gc: garbage-collect images from the store
This commit makes rkt image gc remove images from the store apart from
unreferenced treestores.
By default, images not used in the last 24h will be removed. This can be
configured with the
--grace-period
.Fixes #1205