kubeface icon indicating copy to clipboard operation
kubeface copied to clipboard

implement cleanup

Open timodonnell opened this issue 8 years ago • 1 comments

Kubeface writes a bunch of stuff to the bucket. After a computation has succeeded, we'll usually want to get rid of these.

The user should call client.cleanup() after their script has completed successfully. This should:

  • delete task input bucket items
  • delete task output buket items
  • rename the job status page from active:xxx to completed:xxx
  • delete all kubernetes pods that were created by the client (they are in a "completed" state and do not show up if you just run kubectl get pods without the -a flag)

Rationale for not doing this automatically is that the script may crash later on, and we want to pick up and use previously run tasks in that case. Only the user knows if the overall script has completed successfully.

Additionally, we should implement a kubeface-cleanup command that takes a job name (or cache key?) and does the cleanup for it.

Finally, we should maybe implement a __del__ method in the Client that prints out a message if the client is garbage collected without doing a cleanup, telling the user the kubeface-cleanup command to run to do the cleanup.

timodonnell avatar Dec 22 '16 02:12 timodonnell

We should also cleanup broadcasts

timodonnell avatar Jan 12 '17 16:01 timodonnell