-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a flag to exit immediately on error instead of retrying #297
Conversation
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.
Hi @xqm32, thank you for submitting this pull request!
I'm supportive of this feature in general, although I really do wish we could handle SIGTERM
. I think I looked into it a while ago and came to the same conclusion as you (but I don't remember why exactly).
I think we need to change the name of the flag to be more specific. --fail-fast
makes me think that Docuum will terminate if it fails to delete an image for whatever reason. Maybe --fail-if-docker-events-fails
? (Ugh.)
I am also concerned about the startup behavior: I think most users enjoy not having to worry about starting Docuum and Docker in any particular order, since Docuum will happily just sit around until Docker is read. But with this flag enabled, that is no longer true. I'm not sure what the best solution is though.
@@ -38,12 +38,15 @@ Here are the supported command-line options: | |||
|
|||
``` | |||
USAGE: | |||
docuum | |||
docuum [OPTIONS] |
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.
Did the output of docuum --help
change here with the introduction of the new flag? (Is this clap
's behavior?)
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.
clap
says1:
The default is that the auto-generated help message will group flags, and options separately.
Maybe the flag --fast-fail
makes clap
reorganize the help information.
Footnotes
How about
If users are running Footnotes |
This PR adds a flag to prevent restarting the
docker event
subprocess.I'm working on Docker in Docker within Kubernetes, leveraging
docuum
for Docker image management. While docuum effectively cleans up unused images, I encountered an issue with stoppingdocuum
containers in a Kubernetes environment. Currently, when attempting to shut downdocuum
, it doesn't respond to theSIGTERM
signal, necessitating a wait for the Grace Termination Duration before receiving aSIGKILL
.I've explored implementing
SIGTERM
handling fordocuum
, but found it to be complex and inelegant. Instead, I propose introducing an--fail-fast
option. With this option, if the Docker engine goes down,docuum
will shut down as well. This enhancement is particularly valuable in Kubernetes setups, where Kubernetes will restart thedocuum
container if the Docker engine isn't ready. Additionally, this ensuresdocuum
can correctly terminate when shutting down the entire pod.Status: Ready
Fixes (Partly): #234