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

When using square opening and closing brackets in title => puppet error

    XMLWordPrintable

    Details

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

      Centos 6.5

    • Template:

      Description

      When using the following to define a title for a custom type: mycluster[01-02], I get the below error
      "Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type custom_class at /etc/puppet/manifests/site.pp:14 on node mypuppetnode.xx"

      I simplified the use case as originally I was reading from hiera files, then calling create_resources and got a misleading "...Invalid resource type my_custom_type..." encountered when calling create_resources. Indeed, when using mycluster[01-02] as a key/identifier for a hash in YAML I am guessing this is used as the title/name to instantiate the custom type.

      Below code reproduces on my side:
      class custom_class {
      }

      define custom_type {
      }
      #below line works but would not if closing square bracket
      custom_type

      {'mycluster[1-2':}

      #below line produces an error
      custom_class

      {'mycluster[1-2]':}

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              goungy Jérôme Dubois
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support