• k8s-merge-robot's avatar
    Merge pull request #29380 from bboreham/kill-setpgid · 03fe6b96
    k8s-merge-robot authored
    Automatic merge from submit-queue
    
    Fix killing child sudo process in e2e_node tests
    
    Fixes #29211.
    
    The context is we are trying to kill a process started as `sudo kube-apiserver`, but `sudo` ignores signals from the same process group. Applying `Setpgid` means the `sudo kill` process won't be in the same process group, so will not fall foul of this nifty feature.
    
    I also took the liberty of removing some code setting `Pdeathsig` because it claims to be doing something  in the same area, but actually it doesn't do that at all.  The setting is applied to the forked process, i.e. `sudo`, and it means the `sudo` will get killed if we (`e2e_node.test`) die.  This (a) isn't what the comment says and (b) doesn't help because sending SIGKILL to the sudo process leaves sudo's child alive.
    
    I didn't use the "hack for linux-only" approach because I think `Setpgid` is available on all platforms that `e2e_node` builds on.
    03fe6b96
Name
Last commit
Last update
..
environment Loading commit data...
jenkins Loading commit data...
runner Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
cgroup_manager_test.go Loading commit data...
configmap_test.go Loading commit data...
container.go Loading commit data...
container_manager_test.go Loading commit data...
doc.go Loading commit data...
downward_api_test.go Loading commit data...
e2e_build.go Loading commit data...
e2e_node_suite_test.go Loading commit data...
e2e_remote.go Loading commit data...
e2e_service.go Loading commit data...
exec_util.go Loading commit data...
image.go Loading commit data...
image_conformance_test.go Loading commit data...
image_list.go Loading commit data...
kubelet_test.go Loading commit data...
mirror_pod_test.go Loading commit data...
privileged_test.go Loading commit data...
runtime_conformance_test.go Loading commit data...
util.go Loading commit data...