Bug 991233 - amavisd.service fails to start because required default folders are missing
Summary: amavisd.service fails to start because required default folders are missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: amavisd-new
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Juan Orti
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-01 22:42 UTC by John Florian
Modified: 2014-03-19 08:49 UTC (History)
8 users (show)

Fixed In Version: amavisd-new-2.8.1-1.fc20
Clone Of: 863069
Environment:
Last Closed: 2014-03-19 08:49:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description John Florian 2013-08-01 22:42:10 UTC
+++ 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 15:11:48 UTC
(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 16:52:48 UTC
(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 21:30:16 UTC
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 12:52:33 UTC
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 14:26:34 UTC
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 14:43:01 UTC
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 04:09:21 UTC
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 04:42:58 UTC
amavisd-new-2.8.1-1.fc20 works

Comment 9 Fedora Update System 2014-03-19 08:47:22 UTC
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 08:49:09 UTC
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.