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
Bug 1893362: Ensure tail processes exit with parent #859
Bug 1893362: Ensure tail processes exit with parent #859
Conversation
(Not tested) |
@cgwalters: This pull request references Bugzilla bug 1893362, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@cgwalters: This pull request references Bugzilla bug 1893362, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
Hm actually the new problem may be the EDIT: yep it's the other one. |
/hold |
4aa2511
to
efadcf3
Compare
OK updated. |
a721c06
to
9c33133
Compare
What I've been doing to test is:
Terminates right away. But if I remove the So while I didn't test this complete change in a cluster, I am pretty confident this should fix it. |
9c33133
to
d72f8b0
Compare
Why is this bash code duplicated in openshift-sdn and ovn-kubernetes btw? |
@cgwalters because we don't have a bash library script that we add to all the containers that we can call? |
OK, that seems not too hard to fix but we can do that later. You might say there's a long tail of problems here. |
Argh, util-linux in RHEL8 is too old. That's rather annoying. I switched to using |
We were proxying SIGTERM in the "ovs in container" path, we need to do the same with the ovs-on-host path. I think this will help avoid problems like https://bugzilla.redhat.com/show_bug.cgi?id=1893362
d72f8b0
to
6588ba7
Compare
/test e2e-agnostic-upgrade |
This one is passing CI, can I get the approves and lgtms and 🎉 emoji etc.? |
/lgtm |
Also needs a |
# Don't need to worry about restoring flows; this can only change if we've rebooted | ||
exec tail -F /host/var/log/openvswitch/ovs-vswitchd.log /host/var/log/openvswitch/ovsdb-server.log | ||
tail --pid=$BASHPID -F /host/var/log/openvswitch/ovs-vswitchd.log /host/var/log/openvswitch/ovsdb-server.log & |
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.
Question: why does exec tail ...
not exit when it gets a SIGTERM? Shouldn't that always exit? Bash is gone...
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.
By default in Linux (possibly Unix in general) pid 1 has SIGTERM
set to ignore by default... For basically bad reasons this is still the default with pid namespaces; it clearly would have been better to change it but we can't now.
https://vagga.readthedocs.io/en/latest/pid1mode.html
https://hynek.me/articles/docker-signals/
etc.
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.
OHHHHHHHH. Wow.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, cgwalters, squeed The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
vsphere looks like provisioning failures. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@cgwalters: All pull requests linked via external trackers have merged: Bugzilla bug 1893362 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There's a great Linux-specific feature that allows sending a signal
to a child process when its parent dies. This allows strongly
"lifecycle binding" two processes together and avoiding the default
Unix behavior where the child process will just be reparented.
I think this will help avoid problems like
https://bugzilla.redhat.com/show_bug.cgi?id=1893362
where when the bash process exits, the tail process sticks around.
Perhaps something isn't removing the pid file? In any case when
this pod is requested to terminate, the tail processes should die too.