In a container, or in systemd it's possible to have memory limits imposed by cgroups. Sadly, these are not exposed via getrlimit, or in meminfo. Apparently they have their own api and locations.
For more see:
https://fabiokung.com/2014/03/13/memory-inside-linux-containers/ https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html
It's likely Directory Server will be run in one of these conditions. We should make sure that util_info_sys_pages can detect this correctly so we can make a correct assesment of cache checking.
Per weekly meeting, setting the milestone to 1.3.6.
William, if it is needed earlier than that, please feel free to update it. Thanks!
Might be possible with
{{{ /sys/fs/cgroup/memory/memory.limit_in_bytes /sys/fs/cgroup/memory/memory.soft_limit_in_bytes }}}
Metadata Update from @firstyear: - Issue assigned to firstyear - Issue set to the milestone: 1.3.6.0
<img alt="0002-Ticket-48864-Cleanup-memory-detection-before-we-add-.patch" src="/389-ds-base/issue/raw/files/a93d8c39090cea2ff30546b527016d763ecd3a90f4a76341fbdcbba529a5320c-0002-Ticket-48864-Cleanup-memory-detection-before-we-add-.patch" />
Metadata Update from @firstyear: - Custom field reviewstatus adjusted to new - Issue close_status updated to: None
<img alt="0001-Ticket-48864-Cleanup-up-broken-format-macros-and-imp.patch" src="/389-ds-base/issue/raw/files/a7f757134085798dc3484d924695aa0510eb1fc7c6b37134990c30eb71eb1eb2-0001-Ticket-48864-Cleanup-up-broken-format-macros-and-imp.patch" />
This cleans up our memory detection code before we add the cgroup detection.
Metadata Update from @firstyear: - Custom field reviewstatus adjusted to review (was: new)
Metadata Update from @mreynolds: - Custom field reviewstatus adjusted to ack (was: review)
commit d7ea586 commit 0550cea To ssh://git@pagure.io/389-ds-base.git fcfe4e4..0550cea master -> master
<img alt="0001-Ticket-48864-Add-cgroup-memory-limit-detection-to-38.patch" src="/389-ds-base/issue/raw/files/5aebc50255a5665943528bde7f544c422ed9e9ee80c4b0193a41468d6740dff3-0001-Ticket-48864-Add-cgroup-memory-limit-detection-to-38.patch" />
Metadata Update from @firstyear: - Custom field reviewstatus adjusted to review (was: ack)
Basic tests pass with this patch, in a container with a 1GB memory limit.
Fix compiler warnings from initial patches
<img alt="0001-Ticket-48864-Add-cgroup-memory-limit-detection-to-38.patch" src="/389-ds-base/issue/raw/files/fa8bb6f19dc03539864c8a98f0e3b1fca79242f60fe95495f8d773e303379c49-0001-Ticket-48864-Add-cgroup-memory-limit-detection-to-38.patch" />
Looks good, even the indentation ;-)
Thanks mate, spent a lot of time aligning all the bits :)
commit a96f833
Metadata Update from @firstyear: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Metadata Update from @mreynolds: - Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1443682
Issue linked to Bugzilla: Bug 1443682
This change introduced build issue for FreeIPA: https://kojipkgs.fedoraproject.org/work/tasks/6354/19556354/build.log
configure fails to find slapi_pal.h <img alt="0001-Issue-48864-Fix-FreeIPA-build.patch" src="/389-ds-base/issue/raw/files/1c67169f0fc1ef066c7d625698fae3dea965e80548e637c1cae0e975048287e7-0001-Issue-48864-Fix-FreeIPA-build.patch" />
Metadata Update from @vashirov: - Custom field reviewstatus adjusted to review (was: ack) - Issue status updated to: Open (was: Closed)
Thank you, Mark!
To ssh://pagure.io/389-ds-base.git 9327a99..e659e32 master -> master 910a4ce..9563d29 389-ds-base-1.3.6 -> 389-ds-base-1.3.6
Metadata Update from @vashirov: - Issue assigned to vashirov (was: firstyear)
Metadata Update from @vashirov: - Issue assigned to firstyear (was: vashirov) - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
I think we need to tweak this slight, because config.h needs to not be in slapi_pal.h. I'll make a follow up for this.
<img alt="0001-Ticket-48864-remove-config.h-from-spal-header.patch" src="/389-ds-base/issue/raw/files/6f3ed81f00c6e15d7fbb7c0a2b456a0a30a574b72f4f107008fdfffbaad69dd5-0001-Ticket-48864-remove-config.h-from-spal-header.patch" /> @vashirov I think this is a better way to approach this :)
Metadata Update from @firstyear: - Custom field reviewstatus adjusted to review (was: ack) - Issue status updated to: Open (was: Closed)
@firstyear I have no objections. slapi-nis builds (and freeipa too).
This patch generates compiler warnings:
In file included from ../389-ds-base/ldap/servers/slapd/slapi-private.h:11:0, from ../389-ds-base/ldap/servers/slapd/slapi_pal.c:17: ./config.h:358:0: warning: "LINUX" redefined #define LINUX 1 In file included from /usr/include/nspr4/prtypes.h:26:0, from ../389-ds-base/ldap/servers/slapd/slapi-plugin.h:33, from ../389-ds-base/ldap/servers/slapd/slapi_pal.c:15: /usr/include/nspr4/prcpucfg.h:19:0: note: this is the location of the previous definition #define LINUX
This is because we included both slapi-plugin and slapi-private header files, but slapi-private already calls slapi-plugin. Its a minor fix that I'll include in the commit
f913252..adb18fa master -> master
da751b8..e392712 389-ds-base-1.3.6 -> 389-ds-base-1.3.6
Another option is we should set #pragma once in slapi-plugin and slapi-private.
Metadata Update from @mreynolds: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/1924
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: fixed)
Login to comment on this ticket.