systemd and autofs/nfs are at war and have been ever since systemd
appeared.

Specifically, if machine A has an open connection to machine B
and B goes down or become inaccessible, then A cannot shutdown.
A's shutdown sequence hangs, waiting for B to respond to an unmount
command, which will not/cannot happen. 

WAITING WILL NOT HELP.

Only a dirty disconnect will work;  there's no way to avoid it.


Here's what I've tried:

- Precede 'shutdown' or 'reboot' or 'systemctl reboot' with
    umount -fl -t nfs <each nfs-mounted-filesystem>
  (You might expect a forced lazy umount to do the job.
  It doesn't work;  umount just hangs)

- Change nfs mount option to 'soft' instead of 'hard'.
  Edit /etc/nfsmount.conf to say:
      Hard=False
      Soft=True
  (This did change the autofs/nfs mount option, but didn't improve
  the tolerance for a dirty disconnect.  Shutdown still hangs.)

- Reduce systemd's timeout values from 90 to 10 sec; 
  edit /etc/systemd/system.conf to say:
      DefaultTimeoutStartSec=10s
      DefaultTimeoutStopSec=10s
  (During shutdown, systemd displays two times; the time it has waited
  for an unmount event, and the time limit to wait.  Incomprehensibly,
  when the time limit is reached, it bumps it up and continues to wait.
  Changing the default timeout values seems to accelerate this recycling,
  but doesn't do anything for the actual time limit.)

- Change the nfs timeout from 600 (default) to 20 decisec to reduce
  the time nfs waits for any response, including umount, before
  declaring a timeout.  Edit /etc/nfsmount.conf to say:
      # Timeo=600
      Timeo=20
  (The option displayed by the mount command did change, but it did not
  help the shutdown hangup.)

- That leaves ONLY TWO WAYS to shutdown machine A, both ugly:
  SysReq R E I S U B     - which forces a reboot NOW
  Hold the Power button  - which just stops everything.


This is NOT NEW.  Systemd has had this design defect from day one.
SysV never hung on shutdown.  It Just Knew when a dirty disconnect
was the only viable way and handled it.

How many more years must we wait?

Have I overlooked something obvious?  Is there a way to make systemd
perform the simple function 'shutdown' smoothly, reliably and quickly?  
If anyone knows how, I would love to hear it.


-- 
        David A. De Graaf    DATIX, Inc.    Hendersonville, NC
        d...@datix.us         www.datix.us


"Tolerance becomes a crime when applied to evil."
    -- Thomas Mann
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to