Bug 1385713

Summary: [platformmanagement_public_479] Always get job-controller serviceaccount can not get jobs in user's project error in master log after set concurrencyPolicy of scheduledjobs as Replace
Product: OpenShift Container Platform Reporter: Scott Dodson <sdodson>
Component: apiserver-authAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: Chuan Yu <chuyu>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.1CC: aos-bugs, chuyu, jliggitt, maszulik, wjiang
Target Milestone: ---   
Target Release: 3.3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: 1378796 Environment:
Last Closed: 2016-10-27 15:43:11 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: 1378796    
Bug Blocks:    

Description Scott Dodson 2016-10-17 14:47:20 UTC
+++ This bug was initially created as a clone of Bug #1378796 +++

Description of problem:
After update the concurrencyPolicy of scheduledjob to Replace, master config got some logs like:

I0923 05:16:02.052041   13943 event.go:217] Event(api.ObjectReference{Kind:"ScheduledJob", Namespace:"wjiang", Name:"sj3", UID:"17c3a0a9-8168-11e6-bd5e-0e2aa5163549", APIVersion:"batch", ResourceVersion:"3611", FieldPath:""}): type: 'Warning' reason: 'FailedGet' Get job: User "system:serviceaccount:openshift-infra:job-controller" cannot get batch.jobs in project "wjiang"


Version-Release number of selected component (if applicable):
devenv-rhel7_5059

How reproducible:
always

Steps to Reproduce:
1. Create a scheduledjob
oc run sj3 --image=busybox --restart=Never --schedule="*/1 * * * *" -- sleep 300
2. Check the master log
3. Set the concurrencyPolicy of the scheduledjob as Replace
oc patch scheduledjobs sj3 -p '{"spec":{"concurrencyPolicy": "Replace"}}'
4. Check the master log again

Actual results:
2. I0923 05:21:05.092455   13943 event.go:217] Event(api.ObjectReference{Kind:"ScheduledJob", Namespace:"wjiang", Name:"sj3", UID:"0231a8f7-816f-11e6-bd5e-0e2aa5163549", APIVersion:"batch", ResourceVersion:"3702", 
FieldPath:""}): type: 'Normal' reason: 'SuccessfulCreate' Created job sj3-466195180
I0923 05:21:05.103606   13943 event.go:217] Event(api.ObjectReference{Kind:"Job", Namespace:"wjiang", Name:"sj3-466195180", UID:"0d998dde-816f-11e6-bd5e-0e2aa5163549", APIVersion:"batch", ResourceVersion:"3705",
 FieldPath:""}): type: 'Normal' reason: 'SuccessfulCreate' Created pod: sj3-466195180-0ey06

4. I0923 05:22:05.359440   13943 event.go:217] Event(api.ObjectReference{Kind:"ScheduledJob", Namespace:"wjiang", Name:"sj3", UID:"0231a8f7-816f-11e6-bd5e-0e2aa5163549", APIVersion:"batch", ResourceVersion:"3730", 
FieldPath:""}): type: 'Warning' reason: 'FailedGet' Get job: User "system:serviceaccount:openshift-infra:job-controller" cannot get batch.jobs in project "wjiang"


Expected results:
4. Should not get log like this.

Additional info:

--- Additional comment from Jordan Liggitt on 2016-09-27 15:07:35 EDT ---

will be fixed in https://github.com/openshift/origin/pull/11121

--- Additional comment from weiwei jiang on 2016-09-28 05:55:43 EDT ---

Will give a try after the PR has been merged.

--- Additional comment from weiwei jiang on 2016-09-29 05:54:13 EDT ---

Checked with devenv-rhel7_5099, and this issue has been fixed.

Comment 3 Chuan Yu 2016-10-19 03:15:31 UTC
This issue verified with openshift 3.3.1.3

Comment 5 errata-xmlrpc 2016-10-27 15:43:11 UTC
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.

https://access.redhat.com/errata/RHBA-2016:2084