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
tkt-38155: fix(middlewared/jail): handle start/stop gracefully using iocage #1591
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.
Are we supposed to wait for jails to terminate properly?
Won't SIGTERM abort our stop_on_shutdown
call?
@themylogin thats why its still |
I am not familiar with FreeBSD shutdown system. Will a blocking call last in |
@themylogin it would but I would rather not. In your approach there is no reasonable timeout we can ever come up with, it needs to be up to the plugin. I dont see the problem in involving It has not effect whatsoever in development since the shutdown event is not sent unless you actually shutdown. |
The problem I've imagined is rc sending SIGKILL to middlewared that spent too much time not responding to SIGTERM. |
And why is that a problem? All services are the same way. We would be just transferring responsibility, same happens on shutdown, rc.shutdown.local is just part of /etc/rc.d/local. |
I see. My concern is that timeout that is reasonable for shutting down one process may not be enough for shutting down a jail (which may consist of several processes) or even several jails, no matter if shutdown is sequential or parallel. If we do it in middleware, we risk unclear middleware shutdown, if we do it in shutdown rc script, we risk everything below it, if we do it in separate rc script we still may fail to shutdown all jails in time. These are my worries if users would run something fragile like PostgreSQL in jails. |
What timeout are you talking about? There is no timeout in waiting pid to die in rc subsystem. |
I've noted I am not so familiar with it :-D no concerns then. |
Yes, in fact recently we had a problem where consul-alerts would block and not shutdown. |
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.
Last concern: if IOC stop won't block, LGTM!
Ticket: #38155