Bug 815727 - /etc/fstab parser is confused by dead symlinks
Summary: /etc/fstab parser is confused by dead symlinks
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 17
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-24 11:32 UTC by Jan Willies
Modified: 2013-01-14 21:04 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-14 21:04:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Willies 2012-04-24 11:32:04 UTC
Description of problem: I switched from /etc/systemd/system/foo.[auto,]mount to a line in /etc/fstab. Systemd doesn't recognize the new entry after systemctl daemon-reload.


Version-Release number of selected component (if applicable): systemd.x86_64-44-4.fc17


How reproducible: always


Steps to Reproduce:
1. have /etc/systemd/system/home-jan-server.[auto,]mount files 
2. remove files
3. add same entry to /etc/fstab
  
Actual results: 
/etc/fstab:
dockstar:/mnt/storage  /home/jan/server  nfs  noauto,comment=systemd.automount  0 0

[jan@jan ~]$ sudo systemctl start home-jan-server.automount
Job failed. See system journal and 'systemctl status' for details.

[jan@jan ~]$ systemctl status home-jan-server.automount
home-jan-server.automount
          Loaded: loaded
          Active: inactive (dead)
           Where: /home/jan/server

[jan@jan ~]$ systemctl status home-jan-server.mount
home-jan-server.mount - /home/jan/server
          Loaded: error (Reason: No such file or directory)
          Active: inactive (dead) since Tue, 24 Apr 2012 13:22:28 +0200; 28s ago
           Where: /home/jan/server
            What: dockstar:/mnt/storage
          CGroup: name=systemd:/system/home-jan-server.mount



Expected results: working autofs mountpoint


Additional info:

Comment 1 Jan Willies 2012-04-25 06:44:19 UTC
I had a dead symlink /etc/systemd/system/remote-fs.target.wants/home-jan-server.automount lying around, which confused systemd. After removing that symlink and reloading systemd, it actually works fine.

Comment 2 Michal Schmidt 2012-04-25 17:07:02 UTC
Were there any complaints logged from systemd in /var/log/messages about the symlink?

Comment 3 Jan Willies 2012-04-25 18:50:13 UTC
no, none. I discovered it myself with find /etc -name ...

Comment 4 Kenneth Topp 2012-09-01 15:21:05 UTC
This seems to be a serious bug.  what is the recovery for this?  a reboot?  That's what I have to do.  is there some command to run that will do this? 

If you don't fix the bug, please document a workaround.

I think also it should reread /etc/fstab when one leaves the emergency mode shell.  Or why not inotify /etc/fstab and reread it when it changes.

Comment 5 Lennart Poettering 2013-01-14 21:04:02 UTC
Unit files in /etc (even if they are in a .wants/ subdir) take precedence over fstab, so I guess everything was handled correctly here. Closing.


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