Bug 1003645
| Summary: | cron jobs fail due to selinux context mismatch | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Nikhil Mone <nmone> |
| Component: | Containers | Assignee: | Miciah Dashiel Butler Masters <mmasters> |
| Status: | CLOSED ERRATA | QA Contact: | libra bugs <libra-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 1.2.0 | CC: | agrimm, baulakh, bleanhar, bmeng, chunchen, gpei, libra-onpremise-devel, mmasters, nmone, qiuzhang, rmillner, xtian |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | rubygem-openshift-origin-node-1.9.14.4-1 | Doc Type: | Bug Fix |
| Doc Text: |
Due to bugs in /usr/bin/oo-scheduled-jobs commands that called upon “ oo_spawn”, for example 'gear' or 'ctl_app' commands did not work inside cron jobs. This was because the “user” part of SELinux context should be 'unconfined_u', but in cron it is 'system_u'. With this fix cron jobs now run as expected.
|
Story Points: | --- |
| Clone Of: | 988519 | Environment: | |
| Last Closed: | 2013-09-25 15:31:05 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 988519 | ||
| Bug Blocks: | |||
|
Description
Nikhil Mone
2013-09-02 14:36:44 UTC
Here is a pull request to cherry-pick the fix to origin-server: https://github.com/openshift/enterprise-server/pull/129 The fix has been merged into enterprise-server: https://github.com/openshift/enterprise-server/commit/ab28ca44fe4bbd24660c7b3a7ccac8db83e8ee96 Verify this bug on puddle: 1.2/2013-09-05.1 1. create a python app with cron-1.4 embedded. 2. add a script called .openshift/cron/minutely/restart.sh to your git repo with these contents and git push: #!/bin/sh gear stop gear start 3. ssh into this app and check the cron log [python-11.osetestv2auto.com 52298faa6088676af6000023]\> cat ./cron/log/cron.minutely.log __________________________________________________________________________ Fri Sep 6 04:25:05 EDT 2013: START minutely cron run __________________________________________________________________________ /var/lib/openshift/52298faa6088676af6000023/app-root/runtime/repo//.openshift/cron/minutely/restart.sh: Stopping gear... CLIENT_RESULT: Stopping CRON cart Stopping PYTHON cart Waiting for stop to finish Starting gear... CLIENT_RESULT: Starting CRON cart Starting PYTHON cart __________________________________________________________________________ Fri Sep 6 04:25:28 EDT 2013: END minutely cron run - status=0 __________________________________________________________________________ Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1275.html |