Closed AlexIvchenko closed 4 weeks ago
Yes, starting container with stopped parent is not a good idea.
https://github.com/ten-nancy/porto/commit/f8f513f9e69f61819d1f65043cb6b95ce21fbea0 added config option to disable such behavior:
/etc/default/portod.conf:
...
container {
enable_start_parents: false
}
...
@frostoov thank you
Could you please also clarify about graceful stop of containers' tree
Usually, graceful shutdown is done from dependent to dependencies e.g. if parent
depends on child
(parent
-> child
) then parent
is stopped beforehand. If dependency child
is gone but parent
is still unaware of shutdown and continues to accept requests than all of these requests are failed because of child
unavailability (actor
-> parent
-x->child
).
Because of that, it seems to me, that SIGTERM should be send to parent beforehand and only if parent didn't stop child
by itself then it's done by porto by stoping orphaned child
.
Does it make sense?
Usually, graceful shutdown is done from dependent to dependencies e.g. if parent depends on child
Child definitely depends on parent — there can't be a child without a parent.
Because of that, it seems to me, that SIGTERM should be send to parent beforehand
This approach leads to violation of following invariant: parent of running container cannot be in stopped state.
Because of that, it seems to me, that SIGTERM should be send to parent beforehand
You can use Kill(parent_container, SIGTERM) api call to achieve such behaivor
Hello!
I have YT exec node which is powered by porto. I want to stop it and I send stop command via RPC. porto log:
stop YT exec-node
command and acquires lockCreateFromSpec request
to create ytserver-job-proxy from YT exec node and waits for lock acquired by stop processCreateFromSpec request
acquires lockI think there are two issues:
Questions
Why porto starts parents during creation of child container instead of throwing an error?
As I remember YT can spawn jobs by several ways:
1 and 2 doesn't lead to starting exec node again, but using porto does.
Why porto stops containers from child to parent?
It seems to me that SIGTERM should be send from parent to children for gracefulness.
PORTO-1010?
I also see PORTO-1010 issue in comments which prohibits starting containers if client is portod. Can you please explain what is this ticket about, I think it can be related to my question?
Thank you in advance