Bug 999884 - There is no check whether "tc" is started before "oo-admin-ctl-tc startuser $gear_uuid"
Summary: There is no check whether "tc" is started before "oo-admin-ctl-tc startuser $...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-22 10:19 UTC by Qiushui Zhang
Modified: 2015-05-14 23:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:48:27 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.