-
Couldn't load subscription status.
- Fork 881
gc: Add flag 'mark-only' to mark garbage pods without deleting them. #2400
Conversation
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-only=true' to marks the time when the pods is not running.
|
LGTM |
|
LGTM |
| 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 |
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-only=true' to
marks the time when the pods is not running.
Follows #1789 (comment)
Next, will need
rkt list/statusandrkt api-serviceto return the timestamp.cc @alban @jonboulle @iaguis @sjpotter @euank