[Bug 1452644] Re: vivid NFSd does not start due to systemd ordering cycle

Martin Pitt martin.pitt at ubuntu.com
Wed May 27 09:11:07 UTC 2015


I can confirm this, by installing network-manager, nfs-kernel-server,
and setserial into a clean VM. setserial's init.d script is very
demanding as it both wants to start in run level "S" (sysinit.target in
systemd's mapping) *and* requires $remote_fs. But we can't start remote
file systems that early if we need NetworkManager for them, this only
works with very simple networking like ifupdown.

I suppose /etc/init.d/setserial wants $remote_fs as it reads stuff from
/var/lib/setserial/ which might potentially be on NFS. Having setserial
on an NFS /var with NetworkManager is certainly a very special case, and
I suppose we could just ignore it. But I think we can relax the early
startup instead.

As far as I can see, the most appropriate course here is to provide a
systemd unit for setserial with more fine-grained ordering, or just a
drop-in to relax the overly harsh "Default-Start: S" (as it really just
Before=system-getty.slice). I don't want to completely replace the
init.d script as it has lots of code (which really doesn't belong there,
but I leave that to the Debian maintainer, and this is too intrusive for
an SRU).

** Package changed: nfs-utils (Ubuntu Wily) => setserial (Ubuntu Wily)

** Changed in: setserial (Ubuntu Wily)
       Status: Triaged => In Progress

** Changed in: setserial (Ubuntu Wily)
     Assignee: (unassigned) => Martin Pitt (pitti)

** Summary changed:

- vivid NFSd does not start due to systemd ordering cycle
+ NFSd does not start due to systemd ordering cycle with setserial

** Description changed:

  NFSd does not start due to systemd ordering cycle.
  
  Manually starting with "systemctl start nfs-kernel-server" after boot
  works fine.
  
  here systemd lines from dmesg:
  
- [    2.559819] random: systemd-udevd urandom read with 8 bits of entropy available
- [   43.181921] systemd[1]: Inserted module 'autofs4'
- [   43.210140] systemd[1]: systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
- [   43.234042] systemd[1]: Detected architecture x86-64.
- [   43.328158] systemd[1]: Set hostname to <xpc>.
- [   43.434248] systemd-sysv-generator[337]: Overwriting existing symlink /run/systemd/generator.late/mdadm-waitidle.service with real service
  [   43.569341] systemd[1]: Cannot add dependency job for unit gssproxy.service, ignoring: Unit gssproxy.service failed to load: No such file or directory.
  [   43.595080] systemd[1]: Found ordering cycle on nfs-server.service/start
  [   43.620748] systemd[1]: Found dependency on network.target/start
  [   43.646476] systemd[1]: Found dependency on NetworkManager.service/start
  [   43.672292] systemd[1]: Found dependency on basic.target/start
  [   43.697952] systemd[1]: Found dependency on sockets.target/start
  [   43.723381] systemd[1]: Found dependency on cups.socket/start
  [   43.748530] systemd[1]: Found dependency on sysinit.target/start
  [   43.773533] systemd[1]: Found dependency on setserial.service/start
  [   43.798185] systemd[1]: Found dependency on remote-fs.target/start
  [   43.822739] systemd[1]: Found dependency on remote-fs-pre.target/start
  [   43.871768] systemd[1]: Found dependency on nfs-server.service/start
  [   43.896442] systemd[1]: Breaking ordering cycle by deleting job network.target/start
  [   43.921641] systemd[1]: Job network.target/start deleted to break ordering cycle starting with nfs-server.service/start
- [   44.109024] systemd[1]: Reached target Encrypted Volumes.
- [   44.135558] systemd[1]: Starting Encrypted Volumes.
- [   44.189110] systemd[1]: Created slice Root Slice.
- [   44.215900] systemd[1]: Starting Root Slice.
- [   44.269513] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
- [   44.296806] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
- [   44.351462] systemd[1]: Listening on LVM2 metadata daemon socket.
- [   44.378792] systemd[1]: Starting LVM2 metadata daemon socket.
- [   44.459356] systemd[1]: Dependency failed for pNFS block layout mapping daemon.
- [   44.486177] systemd[1]: Job nfs-blkmap.service/start failed with result 'dependency'.
- [   44.539816] systemd[1]: Listening on Delayed Shutdown Socket.
- [   44.566481] systemd[1]: Starting Delayed Shutdown Socket.
- [   44.619658] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
- [   44.647063] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
- [   44.702240] systemd[1]: Listening on Journal Socket (/dev/log).
- [   44.730201] systemd[1]: Starting Journal Socket (/dev/log).
- [   44.786161] systemd[1]: Listening on fsck to fsckd communication Socket.
- [   44.814391] systemd[1]: Starting fsck to fsckd communication Socket.
- [   44.870869] systemd[1]: Listening on udev Control Socket.
- [   44.899276] systemd[1]: Starting udev Control Socket.
- [   44.927774] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
- [   44.956547] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
- [   45.013546] systemd[1]: Created slice User and Session Slice.
- [   45.040955] systemd[1]: Starting User and Session Slice.
- [   45.097664] systemd[1]: Listening on Device-mapper event daemon FIFOs.
- [   45.125626] systemd[1]: Starting Device-mapper event daemon FIFOs.
- [   45.181619] systemd[1]: Listening on udev Kernel Socket.
- [   45.209643] systemd[1]: Starting udev Kernel Socket.
- [   45.263885] systemd[1]: Listening on Journal Socket.
- [   45.290707] systemd[1]: Starting Journal Socket.
- [   45.344645] systemd[1]: Listening on Journal Audit Socket.
- [   45.371233] systemd[1]: Starting Journal Audit Socket.
- [   45.423314] systemd[1]: Created slice System Slice.
- [   45.449542] systemd[1]: Starting System Slice.
- [   45.475703] systemd[1]: Started Kernel Module supporting RPCSEC_GSS.
- [   45.502333] systemd[1]: Starting LSB: controls configuration of serial ports...
- [   45.556425] systemd[1]: Mounting POSIX Message Queue File System...
- [   45.639083] systemd[1]: Created slice system-getty.slice.
- [   45.666695] systemd[1]: Starting system-getty.slice.
- [   45.694307] systemd[1]: Starting Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling...
- [   45.750548] systemd[1]: Mounting Debug File System...
- [   45.808508] systemd[1]: Started Set Up Additional Binary Formats.
- [   45.863949] systemd[1]: Started Braille Device Support.
- [   45.891808] systemd[1]: Starting Braille Device Support...
- [   45.974979] systemd[1]: Created slice system-systemd\x2dfsck.slice.
- [   46.002893] systemd[1]: Starting system-systemd\x2dfsck.slice.
- [   46.059331] systemd[1]: Started Read required files in advance.
- [   46.087550] systemd[1]: Starting Read required files in advance...
- [   46.144006] systemd[1]: Starting Create list of required static device nodes for the current kernel...
- [   46.201523] systemd[1]: Starting Uncomplicated firewall...
- [   46.259112] systemd[1]: Mounting RPC Pipe File System...
- [   46.428035] systemd[1]: Starting Increase datagram queue length...
- [   46.483060] systemd[1]: Starting Nameserver information manager...
- [   46.563816] systemd[1]: Reached target Slices.
- [   46.590512] systemd[1]: Starting Slices.
- [   46.617266] systemd[1]: Starting Setup Virtual Console...
- [   46.670131] systemd[1]: Mounting Huge Pages File System...
- [   46.722848] systemd[1]: Starting udev Coldplug all Devices...
- [   46.775948] systemd[1]: Starting LSB: init script for readahead-fedora...
- [   46.974038] systemd[1]: Starting Load Kernel Modules...
- [   47.027087] systemd[1]: Mounting NFSD configuration filesystem...
- [   47.187150] systemd[1]: Mounted NFSD configuration filesystem.
- [   47.240600] systemd[1]: Mounted RPC Pipe File System.
- [   47.294380] systemd[1]: Mounted Huge Pages File System.
- [   47.348380] systemd[1]: Mounted POSIX Message Queue File System.
- [   47.402700] systemd[1]: Mounted Debug File System.
- [   47.457618] systemd[1]: Started LSB: controls configuration of serial ports.
- [   47.513419] systemd[1]: Started Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling.
- [   47.570781] systemd[1]: Started Create list of required static device nodes for the current kernel.
- [   47.628494] systemd[1]: Started Uncomplicated firewall.
- [   47.686300] systemd[1]: Started Increase datagram queue length.
- [   47.743392] systemd[1]: Started Setup Virtual Console.
- [   47.800282] systemd[1]: Started LSB: init script for readahead-fedora.
- [   47.856992] systemd[1]: Started Load Kernel Modules.
- [   47.915150] systemd[1]: Started Nameserver information manager.
- [   47.972378] systemd[1]: Started udev Coldplug all Devices.
- [   48.017097] systemd[1]: Starting udev Wait for Complete Device Initialization...
- [   48.074473] systemd[1]: Mounted Configuration File System.
- [   48.103413] systemd[1]: Starting Apply Kernel Variables...
- [   48.160434] systemd[1]: Mounting FUSE Control File System...
- [   48.215712] systemd[1]: Listening on Syslog Socket.
- [   48.215721] systemd[1]: Starting Syslog Socket.
- [   48.215980] systemd[1]: Starting Journal Service...
- [   48.243677] systemd[1]: Starting Create Static Device Nodes in /dev...
- [   48.298683] systemd[1]: Mounted FUSE Control File System.
- [   48.325717] systemd[1]: Started Journal Service.
- [   50.615277] systemd-journald[419]: Received request to flush runtime journal from PID 1
  
- apt-cache policy nfs-kernel-server
- nfs-kernel-server:
-   Asennettu: 1:1.2.8-9ubuntu8.1
-   Ehdokas:   1:1.2.8-9ubuntu8.1
-   Versiotaulukko:
-  *** 1:1.2.8-9ubuntu8.1 0
-         500 http://fi.archive.ubuntu.com/ubuntu/ vivid-updates/main amd64 Packages
-         100 /var/lib/dpkg/status
-      1:1.2.8-9ubuntu8 0
-         500 http://fi.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
- 
- lsb_release -rd
- Description:	Ubuntu 15.04
- Release:	15.04
+ SRU test case
+ =============
+  - Install network-manager, nfs-kernel-server, and setserial into a clean vivid VM.
+  - Reboot, and you'll find the above ordering cycle (check "sudo journalctl -p warning"). "systemctl status nfs-server.service" will be not running (it could also be that the cycle gets broken on a different point, but that's the most likely one).
+  - With the fixed setserial package (upgrade, then reboot) there should be no cycle and all services start up normally.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 15.04
  Package: nfs-kernel-server 1:1.2.8-9ubuntu8.1
  Uname: Linux 4.1.0-040100rc1-generic x86_64
  ApportVersion: 2.17.2-0ubuntu1
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Thu May  7 12:26:09 2015
  InstallationDate: Installed on 2012-12-22 (865 days ago)
  InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
  SourcePackage: nfs-utils
  UpgradeStatus: Upgraded to vivid on 2015-04-23 (13 days ago)

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to setserial in Ubuntu.
https://bugs.launchpad.net/bugs/1452644

Title:
  NFSd does not start due to systemd ordering cycle with setserial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/setserial/+bug/1452644/+subscriptions



More information about the Ubuntu-server-bugs mailing list