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)
Renamed the postrm script to prerm since it is executed before
uninstallation.
Silenced the output of the systemctl disable commands and added a
conditional restart of MaxScale if a MaxScale instance is running.
Use getent instead of grep to detect if the maxscale user needs to be
created.
The directory was installed as the root user but later on in the
installation process the owner would be changed to the maxscale user. This
causes some validation programs to fail as they expect installed files to
retain the original ownership.
All RPATH setting have to be set before generation of any binary.
Defining of CMAKE_INSTALL_RPATH is moved to separate file which is called from main CMakeLists.txt in the beginning, just after install_layout.cmake
Was deprecated in 2.3. Similar features are in MariaDB-Monitor.
One system test was modified to use MariaDB-Monitor instead. Some parts
of the test are disabled for now to make it pass.
RPM packages by default strip all executables on some systems after
installation. To work around this, the post install part needs to be
prevented. This does not mean the post-install scripts used to create the
directories required by MaxScale.
RPM packages by default strip all executables on some systems after
installation. To work around this, the post install part needs to be
prevented. This does not mean the post-install scripts used to create the
directories required by MaxScale.
Exclude systemd usage if the library is not installed.
Only excluding what is necessary. This keeps the object size the
same and still compiles most of the code.