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

resource_type search can produce errors if storedconfigs is not configured.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:

      Description

      (NOTE: the following is run against 2.7 (currently next), I have also seen the same warnings in 2.6.x)

      If I have a manifest which tries to export resources, then I get the following warning when retrieving the resource_type:

      # cat /tmp/foo.pp class foo ($bar) {
        @@notify { 'foo': } 
      }
       
      [root@mypuppetmaster motd]# puppet resource_type search '*' --manifest /tmp/foo.pp
      warning: You cannot collect without storeconfigs being set on line 2 in file /tmp/foo.pp
      [
        {
          "name": "foo",
          "arguments": {
            "bar": null
          },
          "line": 1,
          "type": "hostclass",
          "file": "/tmp/foo.pp"
        }
      ]
      

      This warning should not occur, since having stored configs configured is not a requirement for querying the type.

      configuring stored configs on the server makes the errors go away

      I also verified that the resource_type call is not exporting resources if storedconfigs is enabled.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              redmine.exporter redmine.exporter
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support