Skip to content

Commit 758781a

Browse files
authored
Merge pull request #1587 from craigcomstock/ENT-12669
Added policy to enable core dumps on all build hosts
2 parents edcb6c2 + bbd5787 commit 758781a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ci/cfengine-build-host-setup.cf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ bundle agent cfengine_build_host_setup
149149
"mingw_build_host" expression => fileexists("/etc/cfengine-mingw-build-host.flag");
150150
"systemssl_build_host" expression => fileexists("/etc/cfengine-systemssl-build-host.flag");
151151
"bootstrap_pr_host" expression => fileexists("/etc/cfengine-bootstrap-pr-host.flag");
152+
linux::
153+
"have_coredumpctl" expression => returnszero("command -v coredumpctl", "useshell");
152154
debian_9|ubuntu_16|redhat_6|centos_6::
153155
"have_opt_jdk21" expression => fileexists("/opt/jdk-21.0.1");
154156
(redhat|centos).!(redhat_6|centos_6|redhat_7|centos_7)::
@@ -173,6 +175,10 @@ bundle agent cfengine_build_host_setup
173175
comment => "note: centos-7 has installed instead of --installed argument, and that works on rhel-8 and rhel-9 so go with the sub-command instead of option";
174176

175177
commands:
178+
have_coredumpctl::
179+
"sysctl kernel.core_pattern='|/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e'" -> { "ENT-12669" }
180+
comment => "Ensure that core_pattern is proper for systemd-coredump if coredumpctl is present.",
181+
contain => in_shell;
176182
!have_opt_jdk21.(debian_9|ubuntu_16|redhat_6|centos_6)::
177183
"sh $(this.promise_dirname)/linux-install-jdk21.sh" contain => in_shell;
178184
(redhat_7|centos_7|redhat_8|centos_8|redhat_9).(!have_development_tools).(yum_dnf_conf_ok)::
@@ -202,6 +208,13 @@ bundle agent cfengine_build_host_setup
202208
"have_$(suse_users_and_groups)_user" expression => returnszero("grep '^$(suse_users_and_groups):' /etc/passwd >/dev/null", "useshell");
203209

204210
files:
211+
linux::
212+
"/etc/security/limits.conf"
213+
edit_line => lines_present("
214+
root - core unlimited
215+
* - core unlimited
216+
");
217+
205218
ubuntu_16|ubuntu_18|redhat_9::
206219
"/etc/hosts" -> { "ENT-12437" }
207220
edit_line => regex_replace("127.0.0.1 localhost localhost.localdomain","127.0.0.1 localhost.localdomain"),

0 commit comments

Comments
 (0)