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

mounttab type defaults cause pass and dump to change

    Details

    • Template:
    • Team:
      Platform OS

      Description

      The pass and dump properties of mounttab have defaults of “0” defined in the type. When running a resource without these specified, existing values set in the fstab get changed to the defaults. Expected behaviour would be to only use the defaults when creating a new entry.

      Example:

      file { "/tmp/fstab-pass-test":
        content => "LABEL=foo /test ext4 noatime 1 2",
      }
       
      mounttab { "/test":
        target  => "/tmp/fstab-pass-test",
        device  => "LABEL=bar",
        require => File["/tmp/fstab-pass-test"],
      }
      

      Log:

      /Stage[main]//File[/tmp/fstab-pass-test]/ensure: defined content as '{md5}2fbfddf5fc3ef4540e6569ea1f80e89a'
      /Stage[main]//Mounttab[/test]/device: device changed 'LABEL=foo' to 'LABEL=bar'
      /Stage[main]//Mounttab[/test]/pass: pass changed '2' to '0'
      /Stage[main]//Mounttab[/test]/dump: dump changed '1' to '0'
      

      Actual file contents:

      # HEADER: This file was autogenerated at 2012-08-25 16:27:42 +0100
      # HEADER: by puppet.  While it can still be managed manually, it
      # HEADER: is definitely not recommended.
      LABEL=bar   /test   ext4    noatime 0   0
      

      Expected:

      LABEL=bar   /test   ext4    noatime 1   2
      

      This also affects “atboot” and “options” for Solaris vfstab, which both set defaults.

      As originally reported at https://projects.puppetlabs.com/issues/16122 I discovered this problem today and it still exists.

      I personally consider it rather important as it makes the mounttab library far less useful in cases where you just wish to tweak an existing mount.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fgimian Fotis Gimian
              QA Contact:
              Eric Thompson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Zendesk Support