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

Recursively copying a directory to Windows 7 nodes fails on files with tilde in the filename

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: PUP 3.8.7
    • Fix Version/s: None
    • Component/s: Windows
    • Environment:

      Server = Ubuntu Server 14.04.5
      Nodes = Windows 7 Pro SP1

    • Template:
    • Acceptance Criteria:
      Hide

      Files with tilde in the filename copy using file's directory recursive mode?

      Show
      Files with tilde in the filename copy using file 's directory recursive mode?
    • Team:
      Agent

      Description

      I'm trying to copy the installation files for some HP scanner software to some Windows nodes. However it is failing on two of the files, both of which have tilde (~) characters in the filenames.

      Here's the relevant output from puppet agent -t to show what's happening:

      [mError: ReplaceFile(c:/PuppetFiles/apps/HPScanjet8270/setup/hpg8270/_8270H~1.cab, c:/PuppetFiles/apps/HPScanjet8270/setup/hpg8270/_8270H~1.cab20161114-3620-ysybqc):  The process cannot access the file because it is being used by another process.
      Error: /Stage[main]/Printer::Scanner::Hp_scanjet_8270/File[c:/PuppetFiles/apps/HPScanjet8270/setup/hpg8270/_8270H~1.cab]/ensure: change from absent to file failed: ReplaceFile(c:/PuppetFiles/apps/HPScanjet8270/setup/hpg8270/_8270H~1.cab, c:/PuppetFiles/apps/HPScanjet8270/setup/hpg8270/_8270H~1.cab20161114-3620-ysybqc):  The process cannot access the file because it is being used by another process.
      

      [Error: ReplaceFile(c:/PuppetFiles/apps/HPScanjet8270/setup/hpg8270/MergeM~1.cab, c:/PuppetFiles/apps/HPScanjet8270/setup/hpg8270/MergeM~1.cab20161114-3620-1c59412):  The process cannot access the file because it is being used by another process.
      [mError: /Stage[main]/Printer::Scanner::Hp_scanjet_8270/File[c:/PuppetFiles/apps/HPScanjet8270/setup/hpg8270/MergeM~1.cab]/ensure: change from absent to file failed: ReplaceFile(c:/PuppetFiles/apps/HPScanjet8270/setup/hpg8270/MergeM~1.cab, c:/PuppetFiles/apps/HPScanjet8270/setup/hpg8270/MergeM~1.cab20161114-3620-1c59412):  The process cannot access the file because it is being used by another process.
      

      Here is the Puppet "command" that I'm using to do this:

          file { $localTargetDir:
       
            ensure             => directory,
            source             => 'puppet:///fs1-install/DRIVERS-SCANNERS/HPScanjet8270/',
            recurse            => true,
            source_permissions => ignore,
       
            require            => File[ $localAppsDir ],
       
          }
      

      NOTE: I don't see why it would make a difference, but the fs1-install part of the path is a cifs mount from our linux file server.

      All the other files work correctly, it's just these two with tilde in the name that have issues, hence my assumption that the tilde is the issue.

      I tried using the ignore attribute in the existing File definition to exclude the tilde files (which worked). Then used separate File definitions for each tilde file, but I had the same issue. I tried putting the file name/path in the path attribute instead of the definition name, but that didn't help either. I tried backslashes, double quotes, single quotes, nothing worked.

      I tried the forum first, here: https://ask.puppet.com/question/28745/recursively-copying-directory-to-windows-7-nodes-fails-on-files-with-tilde-in-name/

      ...but no response yet.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  TheLimey Colin Conway
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: