Bug 1766424
| Summary: | cgroup control-cpu-load.sh script not working | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Mohit Agrawal <moagrawa> |
| Component: | core | Assignee: | Mohit Agrawal <moagrawa> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | urgent | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 7 | CC: | bugs, nchilaka, rhinduja, rhs-bugs, storage-qa-internal |
| Target Milestone: | --- | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1764208 | Environment: | |
| Last Closed: | 2019-11-14 13:18:13 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1764202, 1764208, 1766425 | ||
| Bug Blocks: | |||
REVIEW: https://review.gluster.org/23634 (extras: Cgroup(CPU/Mem) restriction are not working on gluster process) posted (#1) for review on release-7 by MOHIT AGRAWAL REVIEW: https://review.gluster.org/23634 (extras: Cgroup(CPU/Mem) restriction are not working on gluster process) merged (#2) on release-7 by hari gowtham |
RCA: As per current code in script it moves the thread of any gluster process those have gluster keyword as a substring and as of now all gluster threads has glfs prefix so script is not able to move all gluster threads to new created cgroup and cgroup restriction are not working if ps -T -p ${daemon_pid} | grep gluster > /dev/null; then for thid in `ps -T -p ${daemon_pid} | grep gluster | awk -F " " '{print $2}'`; do echo ${thid} > ${LOC}/${cgroup_name}/tasks ; done if cat /proc/${daemon_pid}/cgroup | grep -w ${cgroup_name} > /dev/null; then echo "Tasks are attached successfully specific to ${daemon_pid} to ${cgroup_name}." else echo "Tasks are not attached successfully." fi fi To avoid the same need to change the script for loop condition like below if ps -T -p ${daemon_pid} | grep gluster > /dev/null; then for thid in `ps -T -p ${daemon_pid} | grep -v SPID | awk -F " " '{print $2}'`; do echo ${thid} > ${LOC}/${cgroup_name}/tasks ; done if cat /proc/${daemon_pid}/cgroup | grep -w ${cgroup_name} > /dev/null; then echo "Tasks are attached successfully specific to ${daemon_pid} to ${cgroup_name}." else echo "Tasks are not attached successfully." fi fi