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

Square brackets in file names not handled properly

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: PUP 3.6.2
    • Fix Version/s: None
    • Component/s: Types and Providers
    • Labels:
      None
    • Environment:

      Puppet 3.6.2

      Description

      When trying to transfer a file (directly or as part of a recursive transfer) using the file resource that contains a square bracket '[' character. This issue arose when automating a cygwin installation where files like [.exe and [.1.gz are part of the regular installation.

      This issue seems related to PUP-2700, unfortunately many special characters were tested there with the exception of square brackets. If I understand correctly though the fix supplied there is not available in 3.6.2 and may well work also for square brackets.

      Reproducing is trivial:

      file {'cygwin_installation':
          path => $install_path,
          ensure => directory,
          source => $cygwin_source,
          source_permissions => ignore
      }
       
      file {'bracket_test':
          path => 'C:\[',
          ensure => file,
          source => 'puppet://puppet_data_development/[',
          source_permissions => ignore,
      }
      

      Error message for recursive directory copy:

      Error: /Stage[main]/Cyg_grid_engine::Cygwin/File[cygwin_installation]: Failed to generate additional resources using 'eval_generate': Parameter source failed on File[C:/cygwin/usr/share/man/man1/[.1.gz]: Could not understand source puppet:///puppet_data_development/cyg_gridengine/cygwin/installation/usr/share/man/man1/[.1.gz: bad URI(is not URI?): puppet:///puppet_data_development/cyg_gridengine/cygwin/installation usr/share/man/man1/[.1.gz
       
      Wrapped exception:
      Could not understand source puppet:///puppet_data_development/cyg_gridengine/cygwin/installation/usr/share/man/man1/[.1.gz: bad URI(is not URI?): puppet:///puppet_data_development/cyg_gridengine/cygwin/installation/usr/share/man/man1/[.1.gz
       
      Wrapped exception:
      bad URI(is not URI?): puppet:///puppet_data_development/cyg_gridengine/cygwin/installation/usr/share/man/man1/[.1.gz
      

      Error message for single file copy:

      Error: Failed to apply catalog: Parameter source failed on File[bracket_test]: Could not understand source puppet://puppet_data_development/[: bad URI(is not URI?): puppet://puppet_data_development/[ at /etc/puppet/development/modules/cyg_grid_engine/manifests/cygwin.pp:25
       
      Wrapped exception:
      Could not understand source puppet://puppet_data_development/[: bad URI(is not URI?): puppet://puppet_data_development/[
      Wrapped exception:
      bad URI(is not URI?): puppet://puppet_data_development/[
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mario.oschwald Mario Oschwald
                QA Contact:
                Eric Thompson
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Zendesk Support