Bug 1387443

Summary: openshift-dedicated-role global name 'error' is not defined
Product: OpenShift Container Platform Reporter: Stefanie Forrester <dakini>
Component: apiserver-authAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED CURRENTRELEASE QA Contact: Chuan Yu <chuyu>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: aos-bugs, bingli, dakini, jokerman, mmccomas, pweil, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-16 22:11:59 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:
Attachments:
Description Flags
full journal logs of the openshift-dedicated-role service none

Description Stefanie Forrester 2016-10-20 22:07:06 UTC
Created attachment 1212648 [details]
full journal logs of the openshift-dedicated-role service

Description of problem:

We're seeing these non-fatal errors in journalctl on one host running openshift-dedicated-role:


Oct 20 20:01:36 ip-172-31-57-66.ec2.internal python[34206]: Adding role admin to groups 'dedicated-admins' in project ops-health-build-nodejs-ex-qcs01-master-06cda ...
Oct 20 20:01:36 ip-172-31-57-66.ec2.internal python[34206]: OK
Oct 20 20:02:12 ip-172-31-57-66.ec2.internal python[34206]: AddException in thread Thread-1:
Oct 20 20:02:12 ip-172-31-57-66.ec2.internal python[34206]: Traceback (most recent call last):
Oct 20 20:02:12 ip-172-31-57-66.ec2.internal python[34206]: File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
Oct 20 20:02:12 ip-172-31-57-66.ec2.internal python[34206]: self.run()
Oct 20 20:02:12 ip-172-31-57-66.ec2.internal python[34206]: File "/usr/lib64/python2.7/threading.py", line 764, in run
Oct 20 20:02:12 ip-172-31-57-66.ec2.internal python[34206]: self.__target(*self.__args, **self.__kwargs)
Oct 20 20:02:12 ip-172-31-57-66.ec2.internal python[34206]: File "/usr/bin/apply-dedicated-roles.py", line 266, in async_sync_role
Oct 20 20:02:12 ip-172-31-57-66.ec2.internal python[34206]: p.add_role()
Oct 20 20:02:12 ip-172-31-57-66.ec2.internal python[34206]: File "/usr/bin/apply-dedicated-roles.py", line 140, in add_role
Oct 20 20:02:12 ip-172-31-57-66.ec2.internal python[34206]: print "Failed to add role %s to groups %s in project %s: %s" % (dedicated_role, groups_str, self.name, error)
Oct 20 20:02:12 ip-172-31-57-66.ec2.internal python[34206]: NameError: global name 'error' is not defined
Oct 20 20:26:04 ip-172-31-57-66.ec2.internal python[34206]: ing role dedicated-project-admin to groups 'dedicated-admins' in project ops-health-build-nodejs-ex-qcs01-master-aeba9 ...
Oct 20 20:26:04 ip-172-31-57-66.ec2.internal python[34206]: OK


It errors periodically, then recovers. Performance doesn't seem to be impacted, but the service is restarting a few times per day.

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

openshift-scripts-dedicated-3.3.0.6-1.el7.x86_64

How reproducible:

Only a handful of times, on one host. But it seems to be recurring. This is our only host running openshift-scripts-dedicated-3.3.0.6.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Abhishek Gupta 2016-10-20 22:26:24 UTC
Fixed with https://github.com/openshift/online/pull/509

Comment 2 Abhishek Gupta 2016-10-20 22:27:17 UTC
Bumping severity to just help with tracking. Its a toss-up between a low and a medium.

Comment 3 Abhishek Gupta 2016-11-02 20:01:03 UTC
This is being expected to be built and tested in Dedicated INT shortly.

Comment 4 Abhishek Gupta 2016-11-17 20:16:54 UTC
This can be tested on Dedicated clusters that have been upgraded to Online version 3.3.1.3+

Comment 5 Chuan Yu 2016-11-18 05:23:41 UTC
Checked this with OCP 3.4, no such error logged.
openshift v3.4.0.26+f7e109e
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0


@dakini would you please help try this in your online env? If it fixed in online env, then I will change to verified.

Comment 6 Abhishek Gupta 2016-11-18 18:15:33 UTC
This needs to be tested on a Dedicated cluster with an openshift-scripts-dedicated version of 3.3.1.3+. OCP does not have this role - dedicated clusters do.

Comment 8 Stefanie Forrester 2016-11-21 18:34:44 UTC
I just set this up in ded-int-aws, with version 3.3.1.6-1. So far it looks good. I'll let it run for a day or so to see if the error occurs again.

Comment 9 Abhishek Gupta 2016-11-21 18:45:09 UTC
We'll let QE test it on AWS INT and verify it.

Comment 10 Chuan Yu 2016-11-24 07:00:17 UTC
@abhgupta, QE don't have permission to run the script on AWS INT environment.

As the #C7 and #C8 indicated, the fixes workable in OCP3.4.0.26 and ded-int-aws 3.3.1.6-1, so change the status to verified. If the issue still happen later, please re-open it, thanks.