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

Puppet generates invalid .dot files due to missing escapes of quoted strings in resource names

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.6.1, PUP 3.6.2, PUP 5.5.1
    • Fix Version/s: PUP 6.0.0
    • Component/s: None
    • Template:
      PUP Bug Template
    • Team:
      Platform Core
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Generating graphs of catalogs (Eg: puppet apply --graph) now correctly handles resources with double quotes in the title.

      Description

      Puppet generates invalid .dot files.
      If a resource name contains a quoted string the name is not escaped in the .dot file.

      Example content generated by puppet:

          "Postgresql_psql[GRANT ALL ON DATABASE "puppetdb" TO "puppetdb"]" [
              fontsize = 8,
              label = "Postgresql_psql[GRANT ALL ON DATABASE "puppetdb" TO "puppetdb"]"
          ]
      

      resulting in something like this:

      Correctly escaped it would look like this:

          "Postgresql_psql[GRANT ALL ON DATABASE \"puppetdb\" TO \"puppetdb\"]" [
              fontsize = 8,
              label = "Postgresql_psql[GRANT ALL ON DATABASE \"puppetdb\" TO \"puppetdb\"]"
          ]
      

      The behavior has been reproduced with Puppet 3.6.1 and 3.6.2

        Attachments

        1. graph_fail.png
          21 kB
          Tristan Helmich

          Issue Links

            Activity

              People

              Assignee:
              jacob.helwig Jacob Helwig
              Reporter:
              fadenb Tristan Helmich
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support