Bug 999884

Summary: There is no check whether "tc" is started before "oo-admin-ctl-tc startuser $gear_uuid"
Product: OpenShift Online Reporter: Qiushui Zhang <qiuzhang>
Component: ContainersAssignee: Michal Fojtik <mfojtik>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: mfojtik, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-30 00:48:27 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:

Description Qiushui Zhang 2013-08-22 10:19:28 UTC
Description of problem:
On instance, "oo-admin-ctl-tc startuser $gear_uuid" does not check whether "tc" is started  before the command is executed. If it is already started, failure result will return.

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

How reproducible:
always

Steps to Reproduce:
1. On instance, oo-admin-ctl-tc startuser $gear_uuid
2. Once again, oo-admin-ctl-tc startuser $gear_uuid
3.

Actual results:

[root@ip-10-116-85-9 status]# oo-admin-ctl-tc startuser 607875093880208780951552
Starting tc for 607875093880208780951552: throttled [OK]
[root@ip-10-116-85-9 status]# oo-admin-ctl-tc startuser 607875093880208780951552
Starting tc for 607875093880208780951552: throttled [FAIL]
RTNETLINK answers: File exists
Command failed (null):1
RTNETLINK answers: File exists
Command failed (null):2
RTNETLINK answers: File exists
Command failed (null):3
RTNETLINK answers: File exists
Command failed (null):4
[root@ip-10-116-85-9 status]#

Expected results:
If tc is already started, no failures like above should be given. 

Additional info:

Comment 1 Michal Fojtik 2013-08-22 11:48:18 UTC
This is a tricky one, because I can't figure out how to check if the 'tc' command already include the rules for user...

Probably one solution would be to check if the error message is 'File exists' and suppress that.

Comment 2 Michal Fojtik 2013-08-22 12:00:45 UTC
Forget what I said ;-) Just found 'statususer' ;-)

Comment 3 openshift-github-bot 2013-10-14 13:09:01 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/e4ceb5d5d6576934359f9fb359be84df8ea7f458
Bug 999884 - Check if 'tc' already exists in oo-admin-ctl-tc

Comment 4 Qiushui Zhang 2013-11-14 02:26:12 UTC
Tested on devenv_4030.

[root@ip-10-118-161-73 ~]# oo-admin-ctl-tc startuser 5284329eebbbddef86000007
Starting tc for 5284329eebbbddef86000007: 
Throttling is already active for 5284329eebbbddef86000007 [OK]
[root@ip-10-118-161-73 ~]# oo-admin-ctl-tc startuser 5284329eebbbddef86000007
Starting tc for 5284329eebbbddef86000007: 
Throttling is already active for 5284329eebbbddef86000007 [OK]


It looks much better than before, although it always shows the same message whenever doing "oo-admin-ctl-tc startuser".

Mark the bug as verified.