Bug 680960

Summary: systemd: order of services not respected
Product: [openSUSE] openSUSE 12.1 Reporter: Jan Engelhardt <jengelh>
Component: BasesystemAssignee: Frederic Crozat <fcrozat>
Status: VERIFIED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Factory   
Target Milestone: ---   
Hardware: x86-64   
OS: Linux   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jan Engelhardt 2011-03-18 19:57:00 UTC
Version: systemd-20

I still have issues with NFS mounts at bootup. It seems that execution of /etc/init.d/nfs can happen before rpcbind, and both before the actual mounts are done. As such, `rcnfs status` yields:

nfs.service - LSB: NFS client services
          Loaded: loaded (/etc/init.d/nfs)
          Active: failed since Fri, 18 Mar 2011 20:40:49 +0100; 9min ago
         Process: 1827 ExecStart=/etc/init.d/nfs start (code=exited, status=3/NOTIMPLEMENTED)
          CGroup: name=systemd:/system/nfs.service

Now, because systemd does not tell me where it failed (that too I would consider a bug), I added a call to "ps xaf" to /etc/init.d/nfs just to track what it is doing:

Fri Mar 18 20:54:21 CET 2011
  PID TTY      STAT   TIME COMMAND
    2 ?        S      0:00 [kthreadd]
    3 ?        S      0:00  \_ [ksoftirqd/0]
    4 ?        S      0:00  \_ [kworker/0:0]
    5 ?        S      0:00  \_ [kworker/u:0]
    6 ?        S      0:00  \_ [migration/0]
    7 ?        S      0:00  \_ [watchdog/0]
    8 ?        S      0:00  \_ [migration/1]
    9 ?        S      0:00  \_ [kworker/1:0]
   10 ?        S      0:00  \_ [ksoftirqd/1]
   11 ?        S      0:00  \_ [kworker/0:1]
   12 ?        S      0:00  \_ [watchdog/1]
   13 ?        S      0:00  \_ [migration/2]
   14 ?        S      0:00  \_ [kworker/2:0]
   15 ?        S      0:00  \_ [ksoftirqd/2]
   16 ?        S      0:00  \_ [watchdog/2]
   17 ?        S      0:00  \_ [migration/3]
   18 ?        S      0:00  \_ [kworker/3:0]
   19 ?        S      0:00  \_ [ksoftirqd/3]
   20 ?        S      0:00  \_ [watchdog/3]
   21 ?        S      0:00  \_ [migration/4]
   22 ?        S      0:00  \_ [kworker/4:0]
   23 ?        S      0:00  \_ [ksoftirqd/4]
   24 ?        S      0:00  \_ [watchdog/4]
   25 ?        S      0:00  \_ [migration/5]
   26 ?        S      0:00  \_ [kworker/5:0]
   27 ?        S      0:00  \_ [ksoftirqd/5]
   28 ?        S      0:00  \_ [watchdog/5]
   29 ?        S      0:00  \_ [migration/6]
   30 ?        S      0:00  \_ [kworker/6:0]
   31 ?        S      0:00  \_ [ksoftirqd/6]
   32 ?        S      0:00  \_ [watchdog/6]
   33 ?        S      0:00  \_ [migration/7]
   34 ?        S      0:00  \_ [kworker/7:0]
   35 ?        S      0:00  \_ [ksoftirqd/7]
   36 ?        S      0:00  \_ [watchdog/7]
   37 ?        S      0:00  \_ [migration/8]
   38 ?        S      0:00  \_ [kworker/8:0]
   39 ?        S      0:00  \_ [ksoftirqd/8]
   40 ?        S      0:00  \_ [watchdog/8]
   41 ?        S      0:00  \_ [migration/9]
   42 ?        S      0:00  \_ [kworker/9:0]
   43 ?        S      0:00  \_ [ksoftirqd/9]
   44 ?        S      0:00  \_ [watchdog/9]
   45 ?        S      0:00  \_ [migration/10]
   46 ?        S      0:00  \_ [kworker/10:0]
   47 ?        S      0:00  \_ [ksoftirqd/10]
   48 ?        S      0:00  \_ [watchdog/10]
   49 ?        S      0:00  \_ [migration/11]
   50 ?        S      0:00  \_ [kworker/11:0]
   51 ?        S      0:00  \_ [ksoftirqd/11]
   52 ?        S      0:00  \_ [watchdog/11]
   53 ?        S      0:00  \_ [migration/12]
   54 ?        S      0:00  \_ [kworker/12:0]
   55 ?        S      0:00  \_ [ksoftirqd/12]
   56 ?        S      0:00  \_ [watchdog/12]
   57 ?        S      0:00  \_ [migration/13]
   58 ?        S      0:00  \_ [kworker/13:0]
   59 ?        S      0:00  \_ [ksoftirqd/13]
   60 ?        S      0:00  \_ [watchdog/13]
   61 ?        S      0:00  \_ [migration/14]
   62 ?        S      0:00  \_ [kworker/14:0]
   63 ?        S      0:00  \_ [ksoftirqd/14]
   64 ?        S      0:00  \_ [watchdog/14]
   65 ?        S      0:00  \_ [migration/15]
   66 ?        S      0:00  \_ [kworker/15:0]
   67 ?        S      0:00  \_ [ksoftirqd/15]
   68 ?        S      0:00  \_ [watchdog/15]
   69 ?        S<     0:00  \_ [cpuset]
   70 ?        S<     0:00  \_ [khelper]
   71 ?        S<     0:00  \_ [netns]
   72 ?        S      0:00  \_ [sync_supers]
   73 ?        S      0:00  \_ [bdi-default]
   74 ?        S<     0:00  \_ [kintegrityd]
   75 ?        S<     0:00  \_ [kblockd]
   76 ?        S<     0:00  \_ [kacpid]
   77 ?        S<     0:00  \_ [kacpi_notify]
   78 ?        S<     0:00  \_ [kacpi_hotplug]
   79 ?        S<     0:00  \_ [ata_sff]
   80 ?        S      0:00  \_ [kseriod]
   81 ?        S<     0:00  \_ [kondemand]
   82 ?        S      0:00  \_ [khungtaskd]
   83 ?        S      0:00  \_ [kworker/12:1]
   84 ?        S      0:00  \_ [kswapd0]
   85 ?        S      0:00  \_ [kswapd1]
   86 ?        SN     0:00  \_ [ksmd]
   87 ?        S      0:00  \_ [fsnotify_mark]
   88 ?        S<     0:00  \_ [aio]
   89 ?        S<     0:00  \_ [crypto]
  104 ?        S      0:00  \_ [kworker/4:1]
  106 ?        S      0:00  \_ [kworker/3:1]
  107 ?        S      0:00  \_ [scsi_eh_0]
  108 ?        S      0:00  \_ [scsi_eh_1]
  109 ?        S      0:00  \_ [scsi_eh_2]
  110 ?        S      0:00  \_ [scsi_eh_3]
  111 ?        S      0:00  \_ [scsi_eh_4]
  112 ?        S      0:00  \_ [scsi_eh_5]
  113 ?        S      0:00  \_ [kworker/u:1]
  114 ?        S      0:00  \_ [kworker/u:2]
  115 ?        S      0:00  \_ [kworker/u:3]
  116 ?        S      0:00  \_ [kworker/u:4]
  117 ?        S      0:00  \_ [kworker/u:5]
 1793 ?        S      0:00  |   \_ /lib/systemd/systemd-cgroups-agent /system/network.service
  118 ?        S      0:00  \_ [kworker/u:6]
  119 ?        S      0:00  \_ [kworker/u:7]
  120 ?        S      0:00  \_ [kworker/13:1]
  121 ?        S      0:00  \_ [kworker/5:1]
  122 ?        S      0:00  \_ [kworker/8:1]
  123 ?        S      0:00  \_ [kworker/6:1]
  124 ?        S      0:00  \_ [kworker/7:1]
  126 ?        S      0:00  \_ [kworker/1:1]
  139 ?        S      0:00  \_ [kworker/9:1]
  157 ?        S      0:00  \_ [kworker/15:1]
  158 ?        S      0:00  \_ [kworker/14:1]
  226 ?        S      0:00  \_ [kworker/2:1]
  227 ?        S      0:00  \_ [kworker/10:1]
  229 ?        S      0:00  \_ [kworker/11:1]
  326 ?        S      0:00  \_ [khubd]
  418 ?        S<     0:00  \_ [md]
  425 ?        S<     0:00  \_ [usbhid_resumer]
  444 ?        S      0:00  \_ [md1_raid1]
  466 ?        S      0:00  \_ [jbd2/md1-8]
  467 ?        S<     0:00  \_ [ext4-dio-unwrit]
  473 ?        S      0:00  \_ [flush-9:1]
  495 ?        S      0:00  \_ [kauditd]
  503 ?        S      0:00  \_ [kworker/4:2]
  517 ?        S      0:00  \_ [kworker/0:2]
  777 ?        S<     0:00  \_ [kstriped]
  819 ?        S<     0:00  \_ [edac-poller]
  856 ?        S<     0:00  \_ [kpsmoused]
  924 ?        S<     0:00  \_ [hd-audio0]
  930 ?        S<     0:00  \_ [hd-audio1]
  934 ?        S<     0:00  \_ [hd-audio2]
  936 ?        S<     0:00  \_ [hd-audio3]
  938 ?        S<     0:00  \_ [hd-audio4]
  969 ?        S      0:00  \_ [md0_raid1]
  987 ?        S<     0:00  \_ [ext4-dio-unwrit]
  997 ?        S      0:00  \_ [kworker/5:2]
 1039 ?        S<     0:00  \_ [kconservative]
 1673 ?        S<     0:00  \_ [bond0]
    1 ?        Ds     0:02 /sbin/init
  493 ?        Ss     0:00 /lib/systemd/systemd-readahead-collect
  494 ?        Ss     0:00 /lib/systemd/systemd-kmsg-syslogd
  510 ?        Ss     0:00 /lib/systemd/systemd-logger
  520 ?        S<s    0:00 /sbin/udevd
  533 ?        S<     0:00  \_ /sbin/udevd
  534 ?        S<     0:00  \_ /sbin/udevd
  535 ?        S<     0:00  \_ /sbin/udevd
  536 ?        S<     0:00  \_ /sbin/udevd
  537 ?        S<     0:00  \_ /sbin/udevd
  538 ?        S<     0:00  \_ /sbin/udevd
  539 ?        S<     0:00  \_ /sbin/udevd
  540 ?        S<     0:00  \_ /sbin/udevd
  541 ?        S<     0:00  \_ /sbin/udevd
  542 ?        S<     0:00  \_ /sbin/udevd
  553 ?        S<     0:00  \_ /sbin/udevd
  557 ?        S<     0:00  \_ /sbin/udevd
  560 ?        S<     0:00  \_ /sbin/udevd
  562 ?        S<     0:00  \_ /sbin/udevd
  565 ?        S<     0:00  \_ /sbin/udevd
  566 ?        S<     0:00  \_ /sbin/udevd
  569 ?        S<     0:00  \_ /sbin/udevd
  571 ?        S<     0:00  \_ /sbin/udevd
  573 ?        S<     0:00  \_ /sbin/udevd
  574 ?        S<     0:00  \_ /sbin/udevd
  575 ?        S<     0:00  \_ /sbin/udevd
  576 ?        S<     0:00  \_ /sbin/udevd
  578 ?        S<     0:00  \_ /sbin/udevd
  579 ?        S<     0:00  \_ /sbin/udevd
  580 ?        S<     0:00  \_ /sbin/udevd
  582 ?        S<     0:00  \_ /sbin/udevd
  586 ?        S<     0:00  \_ /sbin/udevd
  588 ?        S<     0:00  \_ /sbin/udevd
  589 ?        S<     0:00  \_ /sbin/udevd
  591 ?        S<     0:00  \_ /sbin/udevd
  596 ?        S<     0:00  \_ /sbin/udevd
  598 ?        S<     0:00  \_ /sbin/udevd
  600 ?        S<     0:00  \_ /sbin/udevd
  601 ?        S<     0:00  \_ /sbin/udevd
  603 ?        S<     0:00  \_ /sbin/udevd
  606 ?        S<     0:00  \_ /sbin/udevd
  607 ?        S<     0:00  \_ /sbin/udevd
  609 ?        S<     0:00  \_ /sbin/udevd
  612 ?        S<     0:00  \_ /sbin/udevd
  614 ?        S<     0:00  \_ /sbin/udevd
  617 ?        S<     0:00  \_ /sbin/udevd
  619 ?        S<     0:00  \_ /sbin/udevd
  621 ?        S<     0:00  \_ /sbin/udevd
  622 ?        S<     0:00  \_ /sbin/udevd
  623 ?        S<     0:00  \_ /sbin/udevd
  624 ?        S<     0:00  \_ /sbin/udevd
  626 ?        S<     0:00  \_ /sbin/udevd
  628 ?        S<     0:00  \_ /sbin/udevd
  629 ?        S<     0:00  \_ /sbin/udevd
  630 ?        S<     0:00  \_ /sbin/udevd
  631 ?        S<     0:00  \_ /sbin/udevd
  632 ?        S<     0:00  \_ /sbin/udevd
  633 ?        S<     0:00  \_ /sbin/udevd
  637 ?        S<     0:00  \_ /sbin/udevd
  638 ?        S<     0:00  \_ /sbin/udevd
  639 ?        S<     0:00  \_ /sbin/udevd
  640 ?        S<     0:00  \_ /sbin/udevd
  641 ?        S<     0:00  \_ /sbin/udevd
  642 ?        S<     0:00  \_ /sbin/udevd
  643 ?        S<     0:00  \_ /sbin/udevd
  644 ?        S<     0:00  \_ /sbin/udevd
  645 ?        S<     0:00  \_ /sbin/udevd
  646 ?        S<     0:00  \_ /sbin/udevd
  647 ?        S<     0:00  \_ /sbin/udevd
  648 ?        S<     0:00  \_ /sbin/udevd
  649 ?        S<     0:00  \_ /sbin/udevd
  650 ?        S<     0:00  \_ /sbin/udevd
  651 ?        S<     0:00  \_ /sbin/udevd
  652 ?        S<     0:00  \_ /sbin/udevd
  653 ?        S<     0:00  \_ /sbin/udevd
  654 ?        S<     0:00  \_ /sbin/udevd
  655 ?        S<     0:00  \_ /sbin/udevd
  656 ?        S<     0:00  \_ /sbin/udevd
  657 ?        S<     0:00  \_ /sbin/udevd
  658 ?        S<     0:00  \_ /sbin/udevd
  659 ?        S<     0:00  \_ /sbin/udevd
  660 ?        S<     0:00  \_ /sbin/udevd
  661 ?        S<     0:00  \_ /sbin/udevd
  662 ?        S<     0:00  \_ /sbin/udevd
  663 ?        S<     0:00  \_ /sbin/udevd
  664 ?        S<     0:00  \_ /sbin/udevd
  666 ?        S<     0:00  \_ /sbin/udevd
  667 ?        S<     0:00  \_ /sbin/udevd
  668 ?        S<     0:00  \_ /sbin/udevd
  669 ?        S<     0:00  \_ /sbin/udevd
  670 ?        S<     0:00  \_ /sbin/udevd
  671 ?        S<     0:00  \_ /sbin/udevd
  672 ?        S<     0:00  \_ /sbin/udevd
  673 ?        S<     0:00  \_ /sbin/udevd
  733 ?        S<     0:00  \_ /sbin/udevd
  734 ?        S<     0:00  \_ /sbin/udevd
  735 ?        S<     0:00  \_ /sbin/udevd
  736 ?        S<     0:00  \_ /sbin/udevd
  737 ?        S<     0:00  \_ /sbin/udevd
  738 ?        S<     0:00  \_ /sbin/udevd
  739 ?        S<     0:00  \_ /sbin/udevd
  740 ?        S<     0:00  \_ /sbin/udevd
  741 ?        S<     0:00  \_ /sbin/udevd
  742 ?        S<     0:00  \_ /sbin/udevd
  743 ?        S<     0:00  \_ /sbin/udevd
  744 ?        S<     0:00  \_ /sbin/udevd
  745 ?        S<     0:00  \_ /sbin/udevd
  746 ?        S<     0:00  \_ /sbin/udevd
  747 ?        S<     0:00  \_ /sbin/udevd
  748 ?        S<     0:00  \_ /sbin/udevd
 1166 ?        S<sl   0:00 /sbin/auditd -s disable
 1359 ?        Ss     0:00 /bin/dbus-daemon --system --address=systemd: --nofork --systemd-activation
 1414 ?        Zs     0:00 [haldaemon] <defunct>
 1491 ?        Ssl    0:00 /usr/sbin/hald --daemon=yes
 1679 ?        S      0:00  \_ hald-runner
 1794 ?        S      0:00      \_ hald-addon-input: Listening on /dev/input/event0 /dev/input/event1 /dev/input/event3 /dev/input/event4 /dev/input/event6
 1817 ?        S      0:00      \_ /usr/lib/hal/hald-addon-cpufreq
 1818 ?        S      0:00      \_ /usr/lib/hal/hald-addon-acpi
 1500 ?        Ssl    0:00 /usr/sbin/console-kit-daemon --no-daemon
 1643 ?        Sl     0:00 /usr/lib/polkit-1/polkitd
 1823 ?        S      0:00 /bin/mount /archive
 1824 ?        S      0:00  \_ /sbin/mount.nfs dsksrv:/dsksrv/archive /archive -o rw
 1825 ?        S      0:00 /bin/mount /fhome
 1826 ?        S      0:00  \_ /sbin/mount.nfs dsksrv:/dsksrv/fhome /fhome -o rw
 1827 ?        S      0:00 /bin/mount /opt/bin
 1829 ?        S      0:00  \_ /sbin/mount.nfs dsksrv:/dsksrv/opt/bin /opt/bin -o ro
 1828 ?        Zs     0:00 [syslog] <defunct>
 1830 ?        Ss     0:00 /bin/bash /etc/init.d/nfs start
 1855 ?        R      0:00  \_ ps xaf
 1836 ?        Zs     0:00 [showconsole] <defunct>
 1846 ?        Sl     0:00 /sbin/rsyslogd -c 5 -f /etc/rsyslog.conf
 1851 ?        Ds     0:00 sd:exec
Comment 1 Neil Brown 2011-05-13 09:27:55 UTC
Hi Kay,
 Is this something that you can help with or advise on?
Thanks.
Comment 2 Kay Sievers 2011-05-14 18:39:09 UTC
Do you see that on your box?
  # systemctl show nfs.service | grep After
  After=network.target rpcbind.target basic.target
  RemainAfterExit=yes

If possible, use systemd from Base:System. It's still under heavy development, and lots of changes since version 20, and we don't really have resources to support older versions.
Comment 3 Jan Engelhardt 2011-05-16 08:13:48 UTC
Yes, I do see the exact systemctl show nfs.service After output.

Base:System/openSUSE_11.4 still carries v20. (And someone has disabled builds again - gah)
Comment 4 Jan Engelhardt 2011-05-16 09:03:29 UTC
With systemd-26, the NFS volumes are mounted, yet, dmesg still shows

[   26.370285] <30>mount[1684]: mount.nfs: Failed to resolve server dsksrv: Temporary failure in name resolution

and systemctl status says failed.
Comment 5 Kay Sievers 2011-06-22 14:54:52 UTC
Ah, they are mounted. Good. :)

I have no good idea what goes wrong with mount.nfs. The currently
known and sensible workaround seems to mark nfs volumes as comment=systemd.automount in fstab, to delay any nfs mount up to
the point of the first access of the filesystem which is usually long
after the network is successfully brought up.

Reassigning to track and re-check nfs issues with the current
systemd release. Thanks!
Comment 6 Frederic Crozat 2011-09-12 13:31:40 UTC
everything should be fine with current Factory. Please reopen if it isn't the case.