From 22a112e1371639353d57080cc799858bb1592562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 16 Dec 2020 22:34:07 +0200 Subject: [PATCH] Remove redundant ExecStartPost command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The LimitCORE command already sets the process core size limit so the post-start command appears to be useless. In addition, it appears to fail from time to time due to pidof failing to return the process ID of MaxScale right as it starts. This in turn results in an unexplainable failure to start with no messages logged anywhere with the exception of the following from systemctl: [vagrant@maxscale build]$ sudo systemctl status maxscale ● maxscale.service - MariaDB MaxScale Database Proxy Loaded: loaded (/usr/lib/systemd/system/maxscale.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Wed 2020-12-16 21:16:55 CET; 26s ago Process: 304024 ExecStartPost=/bin/sh -c prlimit -p $(pidof maxscale) --core=unlimited (code=exited, status=1/FAILURE) Process: 304003 ExecStart=/usr/bin/maxscale (code=exited, status=0/SUCCESS) Process: 304001 ExecStartPre=/usr/bin/install -d /var/lib/maxscale -o maxscale -g maxscale (code=exited, status=0/SUCCESS) Process: 303999 ExecStartPre=/usr/bin/install -d /var/run/maxscale -o maxscale -g maxscale (code=exited, status=0/SUCCESS) Main PID: 304004 (code=exited, status=0/SUCCESS) --- cmake/init_scripts.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmake/init_scripts.cmake b/cmake/init_scripts.cmake index 01f526e1a..b6de413cb 100644 --- a/cmake/init_scripts.cmake +++ b/cmake/init_scripts.cmake @@ -29,9 +29,7 @@ configure_file(${CMAKE_SOURCE_DIR}/etc/maxscale.conf.in ${CMAKE_BINARY_DIR}/maxs # The systemd service file if (CMAKE_BUILD_TYPE MATCHES "(D|d)(E|e)(B|b)(U|u)(G|g)") # Options enabled only in debug builds (a literal multi-line string) - set(SERVICE_FILE_DEBUG_OPTIONS - "LimitCORE=infinity -ExecStartPost=/bin/sh -c 'prlimit -p $(pidof maxscale) --core=unlimited'") + set(SERVICE_FILE_DEBUG_OPTIONS "LimitCORE=infinity") endif() configure_file(${CMAKE_SOURCE_DIR}/etc/maxscale.service.in ${CMAKE_BINARY_DIR}/maxscale.service @ONLY)