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

Exec "command" Attribute Only Autorequires First Path in String

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.7.1
    • Fix Version/s: None
    • Component/s: Types and Providers
    • Labels:
      None
    • Template:

      Description

      Description

      If a user uses an "command" attribute with multiple paths only the first will be evaluated for autorequire. Example below:

      exec { 'Manifest Test':
        command => '/bin/bash /tmp/manifest/test.sh'
      }
      file { '/tmp/manifest/test.sh':
        ensure  => file,
        content => "#!/bin/bash\necho \"Super Fun\" > /tmp/manifest/test.txt",
        mode    => '0777'
      }
      file { '/tmp/manifest':
        ensure => directory
      }
      

      It would be more helpful for the end user to have all paths in the "command" attribute be evaluated for autorequire.

      Attachments

      • Manifest

      Repro Steps

      1. Install PE on master with Puppet Server enabled.
      2. Verify master is operational.
      3. Copy the attached manifest to the Puppet agent.
      4. On the master execute the following command:

        puppet apply command_before_file_autorequire.pp

      Expect

      The Puppet agent run should complete successfully.

      Actual

      The Puppet agent run fails:

      Info: Retrieving plugin
              Info: Loading facts
              Info: Caching catalog for gl76xwb6hl2rw0w
              Info: Applying configuration version '1413566905'
              Error: /bin/bash: /tmp/manifest/test.sh: No such file or directory
       
              Error: /Stage[main]/Main/Node[default]/Exec[Manifest Test]/returns: change from notrun to 0 failed: /bin/bash: /tmp/manifest/test.sh: No such file or directory

        Attachments

          Activity

            People

            • Assignee:
              josh Josh Cooper
              Reporter:
              ryan.gard Ryan Gard
              QA Contact:
              Ryan Gard
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support