You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When updating salt-minion, salt-master, salt-api, etc RPMS on EL7 (e.g. CentOS 7) and EL8 (e.g. Rocky 8), the services are not restarted - they are when the same is done on EL9 (e.g. Rocky 9)
Setup
Salt 3006.4 installed, attempting to upgrade to 3006.6
Please be as specific as possible and give set-up details.
on-prem machine
VM (VMware/Nutanix)
onedir packaging
Steps to Reproduce the behavior
On EL7/EL8, run: yum update salt-minion
Expected behavior
When updating (e.g.) salt-minion, the salt-minon service should restart - it doesn't on EL7 or EL8 - but does on EL9
Versions Report
salt --versions-report
Salt Version:
Salt: 3006.4Python Version:
Python: 3.10.13 (main, Oct 4 2023, 21:54:22) [GCC 11.2.0]Dependency Versions:
cffi: 1.14.6cherrypy: unknowndateutil: 2.8.1docker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 3.1.2libgit2: Not Installedlooseversion: 1.0.2M2Crypto: Not InstalledMako: Not Installedmsgpack: 1.0.2msgpack-pure: Not Installedmysql-python: Not Installedpackaging: 22.0pycparser: 2.21pycrypto: Not Installedpycryptodome: 3.9.8pygit2: Not Installedpython-gnupg: 0.4.8PyYAML: 6.0.1PyZMQ: 23.2.0relenv: 0.13.12smmap: Not Installedtimelib: 0.2.4Tornado: 4.5.3ZMQ: 4.3.4System Versions:
dist: centos 7.9.2009 Corelocale: utf-8machine: x86_64release: 3.10.0-1160.81.1.el7.x86_64system: Linuxversion: CentOS Linux 7.9.2009 Core
Additional context
It appears the onedir RPMS for EL7/EL8/EL9 are built/packaged on an EL9 system (or similar)
The postuninstall scriptlet added to (e.g.) the salt-minion RPM starts with:
if [ $1 -ge 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then
# Package upgrade, not uninstall
/usr/lib/systemd/systemd-update-helper mark-restart-system-units salt-minion.service || :
fi
However, depending on which OS the RPM is built on, the '%systemd_postun_with_restart' will do different things ... on EL9 it will generate the postuninstall scriptlet above, but on EL7 and EL8, the macro doesn't use '/usr/lib/systemd/systemd-update-helper' - as this doesn't exist on EL7 or EL8 ...
The upshot is that as '/usr/lib/systemd/systemd-update-helper' doesn't exist, the various Salt services are not restarted on upgrade on EL7 or EL8 (there are also similar problems on install and removal of these RPMS)
The 'fix' would be to build the EL7 and EL8 RPMS on an EL7 or EL8 host - or alter the spec file to do the right thing for all versions of EL7/EL8/EL9
The text was updated successfully, but these errors were encountered:
Description
When updating salt-minion, salt-master, salt-api, etc RPMS on EL7 (e.g. CentOS 7) and EL8 (e.g. Rocky 8), the services are not restarted - they are when the same is done on EL9 (e.g. Rocky 9)
Setup
Salt 3006.4 installed, attempting to upgrade to 3006.6
Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior
On EL7/EL8, run: yum update salt-minion
Expected behavior
When updating (e.g.) salt-minion, the salt-minon service should restart - it doesn't on EL7 or EL8 - but does on EL9
Versions Report
salt --versions-report
Additional context
It appears the onedir RPMS for EL7/EL8/EL9 are built/packaged on an EL9 system (or similar)
The postuninstall scriptlet added to (e.g.) the salt-minion RPM starts with:
The RPM spec file for these packages uses systemd macros to define what is done at the various pre/post install stages - e.g. the '%postun minion' section at: https://github.com/saltstack/salt/blob/master/pkg/rpm/salt.spec#L565 has:
However, depending on which OS the RPM is built on, the '%systemd_postun_with_restart' will do different things ... on EL9 it will generate the postuninstall scriptlet above, but on EL7 and EL8, the macro doesn't use '/usr/lib/systemd/systemd-update-helper' - as this doesn't exist on EL7 or EL8 ...
The upshot is that as '/usr/lib/systemd/systemd-update-helper' doesn't exist, the various Salt services are not restarted on upgrade on EL7 or EL8 (there are also similar problems on install and removal of these RPMS)
The 'fix' would be to build the EL7 and EL8 RPMS on an EL7 or EL8 host - or alter the spec file to do the right thing for all versions of EL7/EL8/EL9
The text was updated successfully, but these errors were encountered: