Bug 815727 - /etc/fstab parser is confused by dead symlinks
/etc/fstab parser is confused by dead symlinks
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
17
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-24 07:32 EDT by Jan Willies
Modified: 2013-01-14 16:04 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-14 16:04:02 EST
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 Jan Willies 2012-04-24 07:32:04 EDT
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 02:44:19 EDT
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 13:07:02 EDT
Were there any complaints logged from systemd in /var/log/messages about the symlink?
Comment 3 Jan Willies 2012-04-25 14:50:13 EDT
no, none. I discovered it myself with find /etc -name ...
Comment 4 Kenneth Topp 2012-09-01 11:21:05 EDT
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 16:04:02 EST
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.