Bug 1020029 - oo-reclassify doesn't reclassify threads
oo-reclassify doesn't reclassify threads
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: mfisher
libra bugs
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-16 16:13 EDT by Andy Grimm
Modified: 2016-11-07 22:47 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:24:40 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 Andy Grimm 2013-10-16 16:13:44 EDT
The code used to decide which processes to reclassify into cgroups only looks at top-level processes (/proc/[0-9]*) rather than all tasks (/proc/[0-9]*/tasks/*).

On a related note, the check in oo-accept-node is similarly incorrect.
Comment 1 Andy Grimm 2013-10-16 16:32:42 EDT
That should have been /proc/[0-9]*/task/* (not "tasks")
Comment 2 Rob Millner 2013-10-16 18:04:42 EDT
Pull request:
https://github.com/openshift/origin-server/pull/3910


Here's how to verify for Q/E...

1. Create a non-scaled jbosseap app and note the gear uuid
  - both spawn a ton of threads

2. Find out how many threads are in the gear cgroup, should be over 60.

wc -l /cgroup/all/openshift/[UUID]/tasks


3. Move the tasks to the root cgroup

cat /cgroup/all/openshift/[UUID]/tasks | while read t; echo $t > /cgroup/all/tasks; done

4. This should now be 0, no threads in the gear cgroup

wc -l /cgroup/all/openshift/[UUID]/tasks

5. Repair the cgroup

oo-cgroup-reclassify -c [UUID]

6. This should now be the number from #2 (or very close)

wc -l /cgroup/all/openshift/[UUID]/tasks
Comment 3 openshift-github-bot 2013-10-16 22:19:13 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/b65344195881663880fb52302b7060cd67ccd3e5
Bug 1020029 - needed to enumerate all threads in the task dir.
Comment 5 Meng Bo 2013-10-17 02:47:15 EDT
[root@ip-10-238-172-200 ~]# cat /cgroup/all/openshift/525f86d3617446e3e4000074/tasks |wc -l
61
[root@ip-10-238-172-200 ~]# cat /cgroup/all/openshift/525f86d3617446e3e4000074/tasks | while read t ;do echo $t > /cgroup/all/tasks ;done
[root@ip-10-238-172-200 ~]# cat /cgroup/all/openshift/525f86d3617446e3e4000074/tasks |wc -l
0
[root@ip-10-238-172-200 ~]# oo-cgroup-reclassify -c 525f86d3617446e3e4000074
[root@ip-10-238-172-200 ~]# cat /cgroup/all/openshift/525f86d3617446e3e4000074/tasks |wc -l
64
[root@ip-10-238-172-200 ~]# 


Checked on devenv_3907, issue has been fixed.

Move to verified.
Comment 6 Andy Grimm 2013-10-17 10:53:47 EDT
Moving back to VERIFIED, since this wasn't actually in yesterday's release.

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