[MCOL-4803] ColumnStor RPm files keeps enabling the service on upgrade Created: 2021-07-07  Updated: 2021-07-08

Status: Open
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Assen Totin (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: 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


Generated at Thu Feb 08 02:53:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.