8000 gc: Add flag 'mark-only' to mark garbage pods without deleting them. by yifan-gu · Pull Request #2400 · rkt/rkt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

gc: Add flag 'mark-only' to mark garbage pods without deleting them. #2400

Merged
merged 1 commit into from
Apr 11, 2016

Conversation

yifan-gu
Copy link
Contributor
@yifan-gu yifan-gu commented Apr 8, 2016

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 and rkt api-service to return the timestamp.

cc @alban @jonboulle @iaguis @sjpotter @euank

@yifan-gu
Copy link
Contributor Author
yifan-gu commented Apr 8, 2016

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.
@euank
Copy link
Member
euank commented Apr 8, 2016

LGTM

@iaguis
Copy link
Member
iaguis commented Apr 11, 2016

LGTM

@iaguis iaguis added this to the v1.4.0 milestone Apr 11, 2016
@iaguis iaguis merged commit f894d1c into rkt:master Apr 11, 2016
@@ -67,6 +69,10 @@ func runGC(cmd *cobra.Command, args []string) (exit int) {
return 1
}

if flagMarkOnly {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why skip renameExpired?

Copy link
Contributor Author

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.

@jonboulle
Copy link
Contributor

https://github.com/coreos/rkt/pull/2400/files#r59181183 is non-obvious to me, please explain

@iaguis
Copy link
Member
iaguis commented Apr 11, 2016

You can address those issues in #2402

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

Successfully merging this pull request may close these issues.

4 participants
0