Bug 692963 - autofs init script refers to non-standard $autofs reserved facility, and shouldn't do that.
Summary: autofs init script refers to non-standard $autofs reserved facility, and shou...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: autofs
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Ian Kent
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 710589 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-01 20:00 UTC by Andrew McNabb
Modified: 2011-06-24 17:52 UTC (History)
11 users (show)

Fixed In Version: autofs-5.0.5-38.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-24 17:52:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
output from "systemctl dump" (514.57 KB, text/plain)
2011-04-04 17:24 UTC, Andrew McNabb
no flags Details
Patch - fix lsb service name in init script (1.06 KB, patch)
2011-04-06 06:28 UTC, Ian Kent
no flags Details | Diff

Description Andrew McNabb 2011-04-01 20:00:47 UTC
Description of problem:

At boot time, the following error appears in /var/log/messages:

systemd[1]: Cannot add dependency job for unit autofs.target, ignoring: Unit autofs.target failed to load: No such file or directory. See system logs and 'systemctl status' for details.

If I run "systemctl status", I get the error: "Too few arguments."

If I then run "systemctl status autofs.target", I see a message which doesn't tell me anything about the problem:

autofs.target
	  Loaded: error
	  Active: inactive (dead)

If I then go to /var/log and do "grep autofs *", we see:

messages:Apr  1 13:12:56 testvm kernel: [    2.634507] systemd[1]: Cannot add dependency job for unit autofs.target, ignoring: Unit autofs.target failed to load: No such file or directory. See system logs and 'systemctl status' for details.

If I run "systemctl status", I get the error: "Too few arguments."

If I then run "systemctl status autofs.target", ...

:)

Perhaps the error message could be a little more specific and the default log level should be a little higher.  As I've tried Fedora 15 Alpha this week, I've had a number of times where I had a hard time figuring out even the basics of what systemd was trying to start and what caused an error.


Version-Release number of selected component (if applicable):

systemd-22-1.fc15.x86_64

Comment 1 Michal Schmidt 2011-04-02 13:16:07 UTC
> Unit autofs.target failed to load: No such file or directory

This one is pretty obvious. There is no autofs.target unit file anywhere in the configuration directories.

> autofs.target
>   Loaded: error

Yes, this confirms it.

> See system logs and 'systemctl status' for details.

Right, this message just raises false hopes :-)

Could you do "systemctl dump" to find which unit references the non-existent autofs.target?

Comment 2 Michal Schmidt 2011-04-02 15:44:06 UTC
(In reply to comment #1)
> Could you do "systemctl dump" to find which unit references the non-existent
> autofs.target?

Forget it. I already know what it is. /etc/init.d/autofs has this in its LSB header:

# Provides: $autofs

This gets mapped to autofs.target by systemd.

systemd should not really expect to find a autofs.target unit file. The warning should not be printed in this case.

Comment 3 Andrew McNabb 2011-04-04 17:24:41 UTC
Created attachment 489816 [details]
output from "systemctl dump"

Comment 4 Lennart Poettering 2011-04-04 18:53:04 UTC
There is not standardized ("reserved") facility name $autofs.

The autofs LSB script should not use this.

http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/facilname.html

Comment 5 Ian Kent 2011-04-05 02:19:07 UTC
(In reply to comment #4)
> There is not standardized ("reserved") facility name $autofs.
> 
> The autofs LSB script should not use this.
> 
> http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/facilname.html

Can you spell this out?
What should the "Provides:" be set to?

Comment 6 Bill Nottingham 2011-04-05 15:13:17 UTC
It doesn't need to be set to anything, if I'm reading it right. SysV services automatically 'provide' their service name, so the script automatically provides 'autofs'. By prefixing it with '$', you're attempting to provide a standards-defined facility (which $autofs isn't.)

Comment 7 Ian Kent 2011-04-06 06:28:04 UTC
Created attachment 490149 [details]
Patch - fix lsb service name in init script

Comment 8 Ian Kent 2011-04-06 06:29:17 UTC
Does the above patch help?
Please try the scratch build at (and report back):
http://people.redhat.com/~ikent/autofs-5.0.5-35.bz692963.2.fc15

Comment 9 Andrew McNabb 2011-04-06 16:39:55 UTC
Ian, this new package made the message go away. Thanks for looking into this.

By the way, it looks like there is a minor problem with the version number on the experimental package:

[root@testvm ~]# rpm -Uvh http://people.redhat.com/~ikent/autofs-5.0.5-35.bz692963.2.fc15/autofs-5.0.5-35.bz692963.2.fc15.x86_64.rpm
Retrieving http://people.redhat.com/~ikent/autofs-5.0.5-35.bz692963.2.fc15/autofs-5.0.5-35.bz692963.2.fc15.x86_64.rpm
Preparing...                ########################################### [100%]
	package autofs-1:5.0.5-35.fc15.x86_64 (which is newer than autofs-1:5.0.5-35.bz692963.2.fc15.x86_64) is already installed
[root@testvm ~]#

I ended up getting it to work with "--oldpackage", but I thought I should mention it.

Comment 10 Lennart Poettering 2011-04-06 18:49:48 UTC
Yes, patch looks good. Provides: autofs is exactly the right thing, and without the line things would have worked, too.

Comment 11 Dimitri Papadopoulos 2011-05-27 19:03:29 UTC
I wans't able to access my NAS at home using autofs.
The patch fixes this issue for me.

Comment 12 Stefan Neufeind 2011-05-29 01:32:43 UTC
Patched packets also seem to work for me. Error refering to "autofs.target" is no longer logged (does no longer happen?). So it looks like the patch helps it ...

Comment 13 Rik van Riel 2011-06-03 19:49:07 UTC
*** Bug 710589 has been marked as a duplicate of this bug. ***

Comment 14 Fedora Update System 2011-06-14 03:33:03 UTC
autofs-5.0.5-38.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/autofs-5.0.5-38.fc15

Comment 15 Fedora Update System 2011-06-15 18:39:46 UTC
Package autofs-5.0.5-38.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing autofs-5.0.5-38.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/autofs-5.0.5-38.fc15
then log in and leave karma (feedback).

Comment 16 Fedora Update System 2011-06-24 17:52:43 UTC
autofs-5.0.5-38.fc15 has been pushed to the Fedora 15 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.