Bug 999884 - There is no check whether "tc" is started before "oo-admin-ctl-tc startuser $gear_uuid"
There is no check whether "tc" is started before "oo-admin-ctl-tc startuser $...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Michal Fojtik
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-22 06:19 EDT by Qiushui Zhang
Modified: 2015-05-14 19:27 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-29 19:48:27 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Qiushui Zhang 2013-08-22 06:19:28 EDT
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 07:48:18 EDT
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 08:00:45 EDT
Forget what I said ;-) Just found 'statususer' ;-)
Comment 3 openshift-github-bot 2013-10-14 09:09:01 EDT
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-13 21:26:12 EST
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.