Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-7493

Bind mounts are not correctly handled by the 'mount' provider.

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: mount_core
    • Environment:

      Linux systems able to perform 'bind' mounts.

    • Template:
    • Team:
      Platform OS
    • CS Priority:
      Minor
    • CS Frequency:
      1 - 1-5% of Customers
    • CS Severity:
      3 - Serious
    • CS Business Value:
      2 - $$$
    • CS Impact:
      This is a rare issue because not many people manage bind mounts with puppet. It has a workaround using execs.

      Description

      This is a generic version of MODULES-7489 with the specific issue identified.

      The issue is that the mount provider looks at /etc/fstab and cannot handle the case of a bind mount in the special manner that it requires.

      Per the man page (yeah, I had to look it up), the 'bind' option cannot be applied at the same time as any other options. This means that all other options are silently dropped. This includes if it is called from /etc/fstab!

      Ideally, the mount provider would, when being triggered on a bind mount (options include 'bind'), immediately remount the mountpoint.

      This also goes into how the mount provider is actually checking to see if things are applied. Presently, the parsedfile provider is used on /etc/fstab. However, this is insufficient because you don't know that the mount actually has the correct options without looking at /proc/mounts (on Linux).

      I'm not sure how this works on other *NIX-like systems.

      Reproducer:

      {{
      mount

      { '/tmp': ensure => 'mounted', target => '/tmp', options => 'rw,bind,noexec' }

      }}

      Expected Result => /tmp mounted on top of /tmp with the noexec option.

      Actual Result => /etc/fstab updated, /tmp bind mounted, noexec option missing.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                peiriannydd Trevor Vaughan
                QA Contact:
                Eric Thompson
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Zendesk Support