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

Puppet Accepts Strings for the "returns" Attribute of the "exec" Type

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Template:
    • Console Browser:
      Firefox
    • Master Config:
      Monolithic
    • Agent OS:
      RHEL 7 (x86_64)
    • Master OS:
      CentOS 6
    • Affects Build:
      PE 3.3.1 Gold
    • Epic Link:
    • Team:
      Coremunity

      Description

      Description

      If a user provides a string for the "returns" attribute of the "exec" Puppet reference type Puppet fails to reject the value.

      Error: /usr/bin/test 0 returned 0 instead of one of [cats]                                                                  
      Error: /Stage[main]/Main/Node[default]/Exec[/usr/bin/test 0]/returns: change from notrun to cats failed: /usr/bin/test 0 returned 0 instead of
      one of [cats] 

      Attachments

      • Manifest

      Repro Steps

      1. Install PE on master.
      2. Verify master is operational.
      3. Register agent with the master.
      4. Add node definition for the attached manifest.
      5. On the agent execute the following command:

        puppet agent -t

      Expect

      Puppet should reject the value for "returns".

      Actual

      Puppet attempts to compare the exit code with the string:

      Error: /usr/bin/test 0 returned 0 instead of one of [cats]                                                                  
      Error: /Stage[main]/Main/Node[default]/Exec[/usr/bin/test 0]/returns: change from notrun to cats failed: /usr/bin/test 0 returned 0 instead of
      one of [cats] 

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:

                Zendesk Support