openshift / origin-server

OpenShift 2 (deprecated)
889 stars 516 forks source link

cron_runjobs.sh: adds setsid to timeout command #6364

Closed thrasher-redhat closed 8 years ago

thrasher-redhat commented 8 years ago

Bug 1305544 https://bugzilla.redhat.com/show_bug.cgi?id=1305544

Currently, cron jobs in OpenShift Online inherit the session from /usr/libexec/openshift/cartridges/cron/bin/cron_runjobs.sh , which has SELinux label system_u:system_r:system_cronjob_t:s0-s0:c0.c1023

This process is called under runcon, but only the child processes get a new label (unconfined_u:system_r:openshift_t:s0:cXXX,cYYY). Because of the label change, calling getpgid against the sid fails.

Adds a 'setsid' to the timeout command to resolve the issue.

dobbymoodge commented 8 years ago

+1

dobbymoodge commented 8 years ago

[test][extended:cartridge]

openshift-bot commented 8 years ago

Evaluated for online test up to cdd56c53a1a165979bf607b54424fe833eb6cb4b

openshift-bot commented 8 years ago

Online Test Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests/9203/) (Extended Tests: cartridge)

Miciah commented 8 years ago

Please [merge]!

openshift-bot commented 8 years ago

Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/merge_pull_requests/6713/) (Image: devenv_5774)

openshift-bot commented 8 years ago

Evaluated for online merge up to cdd56c53a1a165979bf607b54424fe833eb6cb4b