Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
More often than not, CS is upgraded via "yum update". On multi-node systems, the systemd service for CS must stay disabled. However, "yum update" keeps enabling the service even if its disabled. This breaks automatic upgrades because somebody needs to stand by and disable the service after every upgrade.
The spec file for the CS package should honour the current status of the unit file and not force enabling the service every time.
To know if the package is being installed or upgraded, check the value of the $1 variable in the %post script of the spec file. If the value is 1, this is the initial installation; if the value is bigger, this is an upgrade. Only run "systemctl enable" (or the equivalent RPM macro) if the value is 1. Example:
%post
if [ $1 == 1 ] ; then
# We are installing, enable the service
systemctl enable mariadb-columnstore.service
else
# Do something else, keep this empty or skip completely
:
fi