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

String.new with custom Array format does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Language
    • Labels:
      None
    • Environment:

      puppetserver-2.7.2-1.el7.noarch
      puppet-agent-1.10.0-1.el7.x86_64
      CentOS 3.10.0-693.5.2.el7.x86_64

    • Template:
      PUP Bug Template
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 1.10.0
      Puppet Server Version: 2.7.2
      OS Name/Version: CentOS 7.4

      Desired Behavior: Masterful and Masterless should behave identically

      Actual Behavior: Masterful breaks(doesn't identify Array during String.new), and Masterless is correct

      Examples:
      Prepared an EPP template for testing and found a difference between Masterful and Masterless results.

      # testmodule/manifests/init.pp
        class testmodule {
          file { '/tmp/test.conf':
            ensure  => file,
            content => epp('testmodule/test.conf.epp')
          }
        }
      # end of testmodule/manifests/init.pp
      

      # testmodule/templates/test.conf.epp
        <%
           $formats = {
             Array => {format => '%(a', string_formats => { Integer => '%#x' } },
           }
           $str = String([1,2,3], $formats)
        -%>
        <%= $str %>
      # end of testmodule/templates/test.conf.epp
      

      When I apply testmodule to the node and run
      (Masteful)
      puppet agent -t
      >>> [1, 2, 3]

      (Masterless)
      puppet apply -e 'include testmodule'
      >>> (0x1, 0x2, 0x3)

      I'm not sure if this affects Puppetserver in the new 5.x or not, I'll see if I can get around to testing that.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            asasfu Adam S
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support