Bug 771543

Summary: for loop in section 2.9.2 removes tasks already found in a subgroup
Product: Red Hat Enterprise Linux 6 Reporter: joja <angie.tawfik>
Component: doc-Resource_Management_GuideAssignee: Martin Prpič <mprpic>
Status: CLOSED CURRENTRELEASE QA Contact: ecs-bugs
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.2CC: jskeoch
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-25 10:06:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description joja 2012-01-04 02:23:39 UTC
Section 2.9.2, reads:

Therefore, it is advisable to move all processes from the root group to a specific subgroup when using the blkio and cpu configuration options which divide an available resource based on a weight or a share (for example, cpu.shares or blkio.weight). To move all tasks from the root group into a specific subgroup, you can use the following command:

rootgroup]# for i in `cat tasks`; do echo $i > red/tasks; done


The for loop above suffer from two issues:
1) It copies the tasks from root group to subgroup rather than moving them.
2) It overrides any tasks in the subgroup.

To avoid these, I suggest the code would become:

rootgroup]# for i in `cat tasks`; do echo $i >> red/tasks; done
rootgroup]# echo '' > tasks

That's all.

Comment 2 Jaromir Hradilek 2012-01-09 21:43:02 UTC
Thank you very much for taking the time to report this issue, I will fix this as soon as possible.

Comment 5 Martin Prpič 2012-06-25 10:06:45 UTC
Fix available on docs.redhat.com. Closing!