Bug 1875299 - Amavis update to amavis-2.12.0-9.el7 stops and disables amavisd
Summary: Amavis update to amavis-2.12.0-9.el7 stops and disables amavisd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: amavis
Version: epel7
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Juan Orti
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-03 09:04 UTC by Todd Taft
Modified: 2020-10-04 00:30 UTC (History)
5 users (show)

Fixed In Version: amavis-2.12.0-10.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-04 00:30:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Todd Taft 2020-09-03 09:04:28 UTC
Description of problem:
Upgrade to amavis-2.12.0-9.el7.noarch from amavisd-new.noarch 2.11.1-1.el7 incorrectly stops and disables amavisd in systemd configuration if it was enabled and running prior to the update

Version-Release number of selected component (if applicable):
amavis-2.12.0-9.el7.noarch

Steps to Reproduce:
1. Install amavisd-new.noarch 2.11.1-1.el7
2. systemctl enable amavisd
3. systemctl reload-or-restart amavisd
3. yum update

Actual results:

systemctl status amavisd shows amavisd is stopped and disabled.

Expected results:

systemctl status amavisd shows amavisd is running and enabled.

Additional info:
Relevant section of /var/log/yum.log:
Sep 03 03:53:22 Installed: amavis.noarch 2.12.0-9.el7
Sep 03 03:53:22 Erased: amavisd-new

Comment 1 Juan Orti 2020-09-03 12:55:29 UTC
There's no easy workaround as the service is disabled and stopped by the removal of the amavisd-new package, and when amavis is installed the systemd preset policy is applied, leaving it disabled.

https://docs.fedoraproject.org/en-US/packaging-guidelines/DefaultServices/#_enabling_services_by_default

Comment 2 Tuomo Soini 2020-09-06 11:43:22 UTC
I'd call this easy. This only works when amavisd-new is getting obsoleted, so once.

%triggerprein -- amavisd-new < 2.12.0-3
systemctl --quiet is-enabled amavisd.service && touch %{_rundir}/amavisd/amavisd.enabled || :
systemctl --quiet is-active amavisd.service && touch %{_rundir}/amavisd/amavisd.running || :

%triggerpostun -- amavisd-new < 2.12.0-3
if [ -f %{_rundir}/amavisd/amavisd.enabled ]; then
    systemctl enable amavisd.service >/dev/null 2>&1 || :
    rm -f %{_rundir}/amavisd/amavisd.enabled
fi
if [ -f %{_rundir}/amavisd/amavisd.running ]; then
    systemctl start amavisd.service >/dev/null 2>&1 || :
    rm -f %{_rundir}/amavisd/amavisd.running
fi

Comment 3 Tuomo Soini 2020-09-06 11:47:45 UTC
And here is same for amavis-snmp

%triggerprein snmp -- amavisd-new-snmp < 2.12.0-3
systemctl --quiet is-enabled amavisd-snmp.service && touch %{_rundir}/amavisd/amavisd-snmp.enabled || :
systemctl --quiet is-active amavisd-snmp.service && touch %{_rundir}/amavisd/amavisd-snmp.running || :

%triggerpostun snmp -- amavisd-new-snmp < 2.12.0-3
if [ -f %{_rundir}/amavisd/amavisd-snmp.enabled ]; then
    systemctl enable amavisd-snmp.service >/dev/null 2>&1 || :
    rm -f %{_rundir}/amavisd/amavisd-snmp.enabled
fi
if [ -f %{_rundir}/amavisd/amavisd-snmp.running ]; then
    systemctl start amavisd-snmp.service >/dev/null 2>&1 || :
    rm -f %{_rundir}/amavisd/amavisd-snmp.running
fi

Comment 4 Tuomo Soini 2020-09-06 12:34:52 UTC
I suggest checking file triggers in rpm documentation, that makes it easier to understand what's going on with these triggers.

Comment 5 Fedora Update System 2020-09-18 21:16:34 UTC
FEDORA-EPEL-2020-a99ad8d21e has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-a99ad8d21e

Comment 6 Fedora Update System 2020-09-19 22:43:30 UTC
FEDORA-EPEL-2020-a99ad8d21e has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-a99ad8d21e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2020-10-04 00:30:28 UTC
FEDORA-EPEL-2020-a99ad8d21e has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.