• 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
..
component/scheduler/perf Loading commit data...
e2e Loading commit data...
e2e_node Loading commit data...
fixtures/pkg/kubectl/cmd/apply Loading commit data...
images Loading commit data...
integration Loading commit data...
kubemark Loading commit data...
soak Loading commit data...
utils Loading commit data...
.gitattributes Loading commit data...
OWNERS Loading commit data...
test_owners.csv Loading commit data...