This repository was archived by the owner on Feb 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 882
gc: Add flag 'mark-only' to mark garbage pods without deleting them. #2400
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
926d59d
to
74f4826
Compare
cc @vcaputo |
If this flag is set to true, then we move the exited/aborted pods to exited-garbage/garbage directory, but do not deleting them. For prepared pods, if the flag is true, we don't move them to garbage even the pods are expired. A third party application can use 'rkt gc --mark-' to marks the time when the pods is not running.
LGTM |
LGTM |
@@ -67,6 +69,10 @@ func runGC(cmd *cobra.Command, args []string) (exit int) { | |||
return 1 | |||
} | |||
|
|||
if flagMarkOnly { |
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.
Why skip renameExpired?
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.
@jonboulle If we don't skip renameExpired, then when doing gc --mark-only
, we need to give a very long time duration to --expired-period
, otherwise it will remove some just prepared pods.
I would like gc --mark-only
to be called without other flags.
https://github.com/coreos/rkt/pull/2400/files#r59181183 is non-obvious to me, please explain |
You can address those issues in #2402 |
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If this flag is set to true, then we move the exited/aborted pods
to exited-garbage/garbage directory, but do not deleting them.
For prepared pods, if the flag is true, we don't move them to garbage
even the pods are expired.
A third party application can use 'rkt gc --mark-' to
marks the time when the pods is not running.
Follows #1789 (comment)
Next, will need
rkt list/status
andrkt api-service
to return the timestamp.cc @alban @jonboulle @iaguis @sjpotter @euank