[systemd-bugs] [Bug 54285] New: Automatic mount point dependencies not always working

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Aug 30 13:19:10 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=54285

             Bug #: 54285
           Summary: Automatic mount point dependencies not always working
    Classification: Unclassified
           Product: systemd
           Version: unspecified
          Platform: x86-64 (AMD64)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
        AssignedTo: systemd-bugs at lists.freedesktop.org
        ReportedBy: bjthinks at gmail.com
         QAContact: systemd-bugs at lists.freedesktop.org


The man page for systemd.mount states: "If an mount point is beneath another
mount point in the file system hierarchy, a dependency between both units is
created automatically."

I tested this and could not verify correct behavior 100% of the time.  This is
unfortunately an intermittent bug -- sometimes the implicit dependencies appear
to work right, and sometimes not.

Here is a typical attempt.  The error occurs near the bottom -- the second time
a-b.mount is started, the implicit dependency a.mount is left inactive.

$ uname -a
Linux arch 3.4.6 #6 SMP PREEMPT Fri Aug 17 15:13:25 PDT 2012 x86_64 GNU/Linux
$ systemctl --version
systemd 188
arch
+PAM -LIBWRAP -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP
$ pwd
/etc/systemd/system
$ cat a.mount
[Unit]
Description=A

[Mount]
What=tmpfs
Where=/a
Type=tmpfs
$ cat a-b.mount
[Unit]
Description=AB

[Mount]
What=tmpfs
Where=/a/b
Type=tmpfs
$ sudo systemctl daemon-reload
$ sudo systemctl status a.mount
a.mount - A
      Loaded: loaded (/etc/systemd/system/a.mount; static)
      Active: inactive (dead)
       Where: /a
        What: tmpfs
      CGroup: name=systemd:/system/a.mount

$ sudo systemctl status a-b.mount
a-b.mount - AB
      Loaded: loaded (/etc/systemd/system/a-b.mount; static)
      Active: inactive (dead)
       Where: /a/b
        What: tmpfs
      CGroup: name=systemd:/system/a-b.mount

$ sudo systemctl start a-b.mount
$ sudo systemctl status a.mount
a.mount - A
      Loaded: loaded (/etc/systemd/system/a.mount; static)
      Active: active (mounted) since Thu, 30 Aug 2012 13:11:23 -0700; 2s ago
       Where: /a
        What: tmpfs
     Process: 4016 ExecMount=/bin/mount tmpfs /a -t tmpfs (code=exited,
status=0/SUCCESS)
      CGroup: name=systemd:/system/a.mount

$ sudo systemctl status a-b.mount
a-b.mount - AB
      Loaded: loaded (/etc/systemd/system/a-b.mount; static)
      Active: active (mounted) since Thu, 30 Aug 2012 13:11:23 -0700; 5s ago
       Where: /a/b
        What: tmpfs
     Process: 4018 ExecMount=/bin/mount tmpfs /a/b -t tmpfs (code=exited,
status=0/SUCCESS)
      CGroup: name=systemd:/system/a-b.mount

$ sudo systemctl stop a.mount
$ sudo systemctl status a.mount
a.mount - A
      Loaded: loaded (/etc/systemd/system/a.mount; static)
      Active: inactive (dead) since Thu, 30 Aug 2012 13:11:47 -0700; 3s ago
       Where: /a
        What: tmpfs
     Process: 4032 ExecUnmount=/bin/umount /a (code=exited, status=0/SUCCESS)
     Process: 4016 ExecMount=/bin/mount tmpfs /a -t tmpfs (code=exited,
status=0/SUCCESS)
      CGroup: name=systemd:/system/a.mount

$ sudo systemctl status a-b.mount
a-b.mount - AB
      Loaded: loaded (/etc/systemd/system/a-b.mount; static)
      Active: inactive (dead) since Thu, 30 Aug 2012 13:11:47 -0700; 8s ago
       Where: /a/b
        What: tmpfs
     Process: 4030 ExecUnmount=/bin/umount /a/b (code=exited, status=0/SUCCESS)
     Process: 4018 ExecMount=/bin/mount tmpfs /a/b -t tmpfs (code=exited,
status=0/SUCCESS)
      CGroup: name=systemd:/system/a-b.mount

$ sudo systemctl start a-b.mount
$ sudo systemctl status a.mount
a.mount - A
      Loaded: loaded (/etc/systemd/system/a.mount; static)
      Active: inactive (dead)
       Where: /a
        What: tmpfs
      CGroup: name=systemd:/system/a.mount

$ sudo systemctl status a-b.mount
a-b.mount - AB
      Loaded: loaded (/etc/systemd/system/a-b.mount; static)
      Active: active (mounted) since Thu, 30 Aug 2012 13:12:02 -0700; 4s ago
       Where: /a/b
        What: tmpfs
     Process: 4044 ExecMount=/bin/mount tmpfs /a/b -t tmpfs (code=exited,
status=0/SUCCESS)
      CGroup: name=systemd:/system/a-b.mount

$

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the systemd-bugs mailing list