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
Migrate OpenShift Cleanup Functions From util.sh #11838
Migrate OpenShift Cleanup Functions From util.sh #11838
Conversation
@@ -35,18 +35,16 @@ function dump_container_logs() { | |||
return | |||
fi | |||
|
|||
mkdir -p ${LOG_DIR} |
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.
We can assume it exists, we do everywhere else and this isn't special.
local sudo="${USE_SUDO:+sudo}" | ||
|
||
pids=($(jobs -pr)) | ||
for i in "${pids[@]-}"; do | ||
pgrep -P "${i}" | xargs ${sudo} kill &> /dev/null |
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.
We should just assume a process kills it's children, or go down the whole tree recursively
Larger functional changes to come later when I integrate these methods into the EXIT trap. |
9279517
to
e821671
Compare
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
e821671
to
64bb815
Compare
@Miciah this is ready for review, second commit is simple Bash improvements, third commit is some functional refactors @openshift-bot [test] this please |
@openshift-bot, the last build failed from the following flakes:
re[test] |
@openshift-bot, the last build failed from the following flakes:
re[test] |
@Miciah ping |
Evaluated for origin test up to 64bb815 |
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/12037/) (Base Commit: 6eefa2a) |
Origin Action Required: Pull request cannot be automatically merged, please rebase your branch from latest HEAD and push again |
@Miciah PTAL the last two commits