Skip to content

Only run systemctl try-restart sssd.service from RPM scripts

Steve Traylen requested to merge scriptlets into master

Recenty seen on upgrade:

[root@b9-009-1 ~]# rpm -evh  cern-sssd-conf-servers-cernch-gpn
error: Failed dependencies:
        cern-sssd-conf-servers-cernch-gpn is needed by (installed) cern-sssd-conf-domain-cernch-1.5-1.al9.cern.noarch
[root@b9-009-1 ~]# rpm -evh  cern-sssd-conf-servers-cernch-gpn cern-sssd-conf-domain-cernch
Preparing...                          ################################# [100%]
Removed "/etc/systemd/system/multi-user.target.wants/sssd.service".
Cleaning up / removing...
   1:cern-sssd-conf-domain-cernch-1.5-################################# [ 50%]
Job for sssd.service failed because the control process exited with error code.
See "systemctl status sssd.service" and "journalctl -xeu sssd.service" for details.
warning: %postun(cern-sssd-conf-domain-cernch-1.5-1.al9.cern.noarch) scriptlet failed, exit status 1
   2:cern-sssd-conf-servers-cernch-gpn################################# [100%]
Job for sssd.service failed because the control process exited with error code.
See "systemctl status sssd.service" and "journalctl -xeu sssd.service" for details.
warning: %postun(cern-sssd-conf-servers-cernch-gpn-1.5-1.al9.cern.noarch) scriptlet failed, exit status 1

Considerations:

  • The only thing we should ever be calling from here is. systemctl try-restart sssd.service Currently there are things like systemctl --no-reload preset sssd.service which make no sense at all.
  • Scriptlets should always return true even if they fail.
  • There are 4 packages that can be installed in isolation with out pulling in another sub package. So its these 4 that require the scripts.
    • cern-sssd-conf
    • cern-sssd-conf-global
    • cern-sssd-conf-domain-cernch
    • cern-sssd-conf-servers-cernch-gpn So it is these packages that require the scripts only.

Possible improvements:

  • If there was is a common package this would be a better place to have the scripts.

Merge request reports