Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-9601

mount resource should trigger 'systemctl daemon-reload'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 5.5.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:
      PUP Bug Template
    • Team:
      Night's Watch
    • Story Points:
      3
    • Sprint:
      PR - 2019-04-17, PR - 2019-05-02, PR - 2019-05-15
    • Method Found:
      Needs Assessment
    • Release Notes:
      Not Needed
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 5.5.3
      Puppet Server Version: 5.3.3
      OS Name/Version: RHEL7

      On systemd distributions entries in /etc/fstab automatically generates systemd .mount files, resulting in systemd effectively managing the mount. When changes are made to /etc/fstab, 'systemctl daemon-reload' must be called in order to generate new systemd mount files. It seems natural to me that puppets mount resource automatically should trigger this reload on changes in fstab if systemd is present, which it does not do currently.

       

      Desired Behavior:

      Changes in mount resources should always trigger a reload of systemd configuration (systemctl daemon-reload)

      Actual Behavior:

      Changes in mount resource only updates fstab. Changes will not update corresponding systemd .mount files until reboot or issuing a 'systemctl daemon-reload' manually. This is particularly inconvinient when using systemd automounting.

      Following puppet mount:

      mount {"/temp":
       ensure => 'present',
       device => 'fs_server:/temp',
       fstype => 'nfs',
       options => 'noauto,x-systemd.automount,x-systemd.device-timeout=10,x-systemd.mount-timeout=30,x-systemd.idle-timeout=60,_netdev,vers=4.0,sec=krb5'
       }

      creates a line in fstab for this mount, but does not create any corresponding systemd mount files. So, in this case, 'mount /temp' will work but not 'systemctl start temp.mount'. On boot, however, systemd will generate mount files (one .mount and one .automount) for this mount automatically. On access the filesystem will be mounted automatically by systemd, and unmounted after 60s of inactivity. If I change mount options for this mount, the fstab will be updated but since the systemd files are not updated any automounting after the change will still use the old options.

      I can workaround this in my code by notifying a 'systemctl daemon-reload' in my mount definition, but if the mount fails for some reason (typically because of a failed remount) the reload command will not run leaving my system in an inconsistent state.

       

        Attachments

          Activity

            People

            Assignee:
            gheorghe.popescu Gheorghe Popescu
            Reporter:
            wiad Adam Winberg
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support