Bug 991233 - amavisd.service fails to start because required default folders are missing
amavisd.service fails to start because required default folders are missing
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: amavisd-new (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Juan Orti
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-01 18:42 EDT by John Florian
Modified: 2014-03-19 04:49 EDT (History)
8 users (show)

See Also:
Fixed In Version: amavisd-new-2.8.1-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 863069
Environment:
Last Closed: 2014-03-19 04:49:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Florian 2013-08-01 18:42:10 EDT
+++ This bug was initially created as a clone of Bug #863069 +++

Description of problem:
There are some default folder locations specified in the config file that don't get created when amavisd-new is installed.  The program fails to start because of it, at least until the host is rebooted.

For example, this message gets printed to the log file when trying to start the service:
amavis[5461]: (!)Net::Server: 2012/10/04-04:35:06 Couldn't open pid file "/var/run/amavisd/amavisd.pid" [No such file or directory].\n\n  at line 318 in fil...Net/Server.pm

In order to make amavisd.service start correctly, I had to do the following:
mkdir /var/spool/amavisd/var
mkdir /var/run/amavisd/
chown -R amavis:amavis /var/spool/amavisd/var /var/run/amavisd/
chmod 700 /var/spool/amavisd/var

After that, everything worked as expected.  The other option is to reboot before attempting to start the service.

Version-Release number of selected component (if applicable):
amavisd-new-2.8.0-5.fc19

How reproducible:
Always

Steps to Reproduce:
1. yum install amavisd-new
2. systemctl start amavisd.service
3.
  
Actual results:
Fails to start

Expected results:
Starts using default config file

Additional info:
I noticed that /var/run/amavisd is not present immediately after installing the package.  Once I rebooted the host, the directory became available.  To me this suggests that the entry /etc/tmpfiles.d/amavisd-new.conf is doing its job, but the spec file for this package needs to also make the same temporary directories as part of package installation, or somehow rerun the tmpfiles.d jobs.  Without doing this, those directories won't be available right after package installation.
Comment 1 Vladislav Grigoryev 2014-02-13 10:11:48 EST
(In reply to John Florian from comment #0)
> ... or somehow rerun the tmpfiles.d jobs.

systemd-tmpfiles --create
Comment 2 John Florian 2014-02-15 11:52:48 EST
(In reply to ArcFi from comment #1)
> (In reply to John Florian from comment #0)
> > ... or somehow rerun the tmpfiles.d jobs.
> 
> systemd-tmpfiles --create


Perfect.  Would the package maintainer please patch the %post to include this critical missing step?
Comment 3 Vladislav Grigoryev 2014-02-15 16:30:16 EST
systemd-tmpfiles --create --prefix=/var/run/amavisd --prefix=/var/run/clamd.amavisd

Better this way.
We do not want to create /var/run/nologin. =)
Comment 4 Fedora Admin XMLRPC Client 2014-03-10 08:52:33 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 5 Fedora Update System 2014-03-10 10:26:34 EDT
amavisd-new-2.8.1-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/amavisd-new-2.8.1-1.fc20
Comment 6 Fedora Update System 2014-03-10 10:43:01 EDT
amavisd-new-2.8.1-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/amavisd-new-2.8.1-1.fc19
Comment 7 Fedora Update System 2014-03-11 00:09:21 EDT
Package amavisd-new-2.8.1-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing amavisd-new-2.8.1-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-3711/amavisd-new-2.8.1-1.fc20
then log in and leave karma (feedback).
Comment 8 lnie 2014-03-11 00:42:58 EDT
amavisd-new-2.8.1-1.fc20 works
Comment 9 Fedora Update System 2014-03-19 04:47:22 EDT
amavisd-new-2.8.1-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2014-03-19 04:49:09 EDT
amavisd-new-2.8.1-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, 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.