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

parser validate hangs on unclosed quotes and braces

    Details

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

      CentOS 6.4, puppet_version=4.2.1, ruby_version=2.1.6, run_mode=user, default_encoding=UTF-8

    • Template:

      Description

      Certain combinations of unclosed quotes and braces can cause puppet parser validate to hang.

      To reproduce:

      1. Put the following into a file test.pp

        class { 'class1':
            param1 => "${val1,
            param2 => "${val2
        }
         
        randomresource { "/*"
        }
        

      2. run puppet parser validate test.pp

      It will hang. Even with --verbose --debug the only output I get is the Debug: Runtime environment: puppet_version=... line.

      The code above is a contrived example minimised as small as I can get it (the quotes and the /* in the second resource all seem to be required to reproduce), but it came from a real-world manifest where I had mucked up a find-replace.

      This is a pretty minor issue, but I'm reporting it as ideally it would give you a helpful message telling you which line of your code was invalid.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                timstibbs Tim Stibbs
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: