Bug 1351415
Summary: | [RFE] Unable to set soft and hard limits for services under systemd | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Jayaraj <jdeenada> |
Component: | systemd | Assignee: | systemd-maint |
Status: | CLOSED ERRATA | QA Contact: | Branislav Blaškovič <bblaskov> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.2 | CC: | avaddara, bblaskov, ccheney, chey, lpol, mschena, msekleta, systemd-maint-list, systemd-maint |
Target Milestone: | rc | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | systemd-219-23.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-04 00:55:22 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jayaraj
2016-06-30 04:02:48 UTC
Already implemented upstream. We need to backport https://github.com/systemd/systemd/pull/1994 and follow-up fix-up commits. patches pushed to staging -> core: dump rlim_cur too https://github.com/lnykryn/systemd-rhel/commit/0c4a515 core: fix rlimit parsing https://github.com/lnykryn/systemd-rhel/commit/b53ec8d core: support <soft:hard> ranges for RLIMIT options https://github.com/lnykryn/systemd-rhel/commit/81a95ec time-util: add parse_time(), which is like parse_sec() but allows specification of default time unit if none is specified https://github.com/lnykryn/systemd-rhel/commit/8afe425 core: accept time units for time-based resource limits https://github.com/lnykryn/systemd-rhel/commit/128ef85 core: support IEC suffixes for RLIMIT stuff https://github.com/lnykryn/systemd-rhel/commit/99074ee -> post Patches look sane but I am not sure how it should behave in case an admin sets incorrect limits, for example: LimitNPROC=32000:30000 # so soft limit is greater than the hard one Any ideas? Now it just totally ignores this line. Ignoring incorrect values (for now), this bug looks fixed. Using /CoreOS/systemd/Regression/Unable-to-set-soft-and-hard-limits-for-services :: [ LOG ] :: Package versions: :: [ LOG ] :: systemd-219-24.el7.x86_64 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Correct limits setup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ PASS ] :: Command 'echo [Service] >/etc/systemd/system/httpd.service.d/ulimit.conf' (Expected 0, got 0) :: [ PASS ] :: Command 'echo LimitNOFILE=6000:8000 >>/etc/systemd/system/httpd.service.d/ulimit.conf' (Expected 0, got 0) :: [ PASS ] :: Command 'echo LimitNPROC=30000:32000 >>/etc/systemd/system/httpd.service.d/ulimit.conf' (Expected 0, got 0) :: [ PASS ] :: Command 'systemctl daemon-reload' (Expected 0, got 0) :: [ LOG ] :: rlServiceStart: Service httpd started successfully :: [ LOG ] :: Duration: 1s :: [ LOG ] :: Assertions: 4 good, 0 bad :: [ PASS ] :: RESULT: Correct limits setup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Correct limits test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ PASS ] :: Command 'systemctl show httpd | grep -ie nproc -e nofile' (Expected 0, got 0) :: [ PASS ] :: Command 'cat /proc/8632/limits' (Expected 0, got 0) :: [ PASS ] :: Command 'grep "Max processes[ ]\+30000[ ]\+32000[ ]\+processes" /var/tmp/tmp.35rGIpMudS' (Expected 0, got 0) :: [ PASS ] :: Command 'grep "Max open files[ ]\+6000[ ]\+8000[ ]\+files" /var/tmp/tmp.35rGIpMudS' (Expected 0, got 0) :: [ LOG ] :: Duration: 0s :: [ LOG ] :: Assertions: 4 good, 0 bad :: [ PASS ] :: RESULT: Correct limits test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Equal limit setup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ PASS ] :: Command 'echo > /etc/systemd/system/httpd.service.d/ulimit.conf' (Expected 0, got 0) :: [ PASS ] :: Command 'echo [Service] >/etc/systemd/system/httpd.service.d/ulimit.conf' (Expected 0, got 0) :: [ PASS ] :: Command 'echo LimitNOFILE=8000:8000 >>/etc/systemd/system/httpd.service.d/ulimit.conf' (Expected 0, got 0) :: [ PASS ] :: Command 'echo LimitNPROC=32000:32000 >>/etc/systemd/system/httpd.service.d/ulimit.conf' (Expected 0, got 0) :: [ PASS ] :: Command 'systemctl daemon-reload' (Expected 0, got 0) :: [ LOG ] :: rlServiceStart: Service httpd already running, stopping first. :: [ LOG ] :: rlServiceStart: Service httpd started successfully :: [ LOG ] :: Duration: 2s :: [ LOG ] :: Assertions: 5 good, 0 bad :: [ PASS ] :: RESULT: Equal limit setup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Equal limits test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ PASS ] :: Command 'systemctl show httpd | grep -ie nproc -e nofile' (Expected 0, got 0) :: [ PASS ] :: Command 'cat /proc/8852/limits' (Expected 0, got 0) :: [ PASS ] :: Command 'grep "Max processes[ ]\+32000[ ]\+32000[ ]\+processes" /var/tmp/tmp.8LjxkmRJzM' (Expected 0, got 0) :: [ PASS ] :: Command 'grep "Max open files[ ]\+8000[ ]\+8000[ ]\+files" /var/tmp/tmp.8LjxkmRJzM' (Expected 0, got 0) :: [ LOG ] :: Duration: 0s :: [ LOG ] :: Assertions: 4 good, 0 bad :: [ PASS ] :: RESULT: Equal limits test Switching to verified. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2216.html Dropping the stale needinfo. If our input is still needed, please set the needinfo again. |