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

PMT fails to install modules on Windows that have long paths

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 3.8.2, PUP 4.2.2
    • Component/s: PMT, Windows
    • Labels:
    • Environment:

      Puppet Agent Version: 1.2.1 (Gold)
      Module Version: 0.1.1-b20025-dd8e40f3
      Agent: Windows 2012 R2 x64

    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      PMT fails on long Windows paths - For modules that install on Windows and use a long hierarchical directory structure, the default TEMP path where PMT extracts the modules tarball can be problematic. Windows has a default maximum path length of 260 characters (MAX_PATH).

      By default, the extracted temp location looks like:
      ~~~
      C:\ProgramData\PuppetLabs\puppet\cache\puppet-module\cache\tmp-unpackerYYYYMMDD-XXXX-xxxxxxx
      ~~~
      The default install location of a puppet 4.0+ module is:
      ~~~
      C:\ProgramData\PuppetLabs\code\environments\production\modules
      ~~~

      In using the Temp directory instead we allow for longer path names in the modules. Instead of using over 90 characters before the module path, we only use around 60, allowing for longer module paths during unpacking.
      Show
      PMT fails on long Windows paths - For modules that install on Windows and use a long hierarchical directory structure, the default TEMP path where PMT extracts the modules tarball can be problematic. Windows has a default maximum path length of 260 characters (MAX_PATH). By default, the extracted temp location looks like: ~~~ C:\ProgramData\PuppetLabs\puppet\cache\puppet-module\cache\tmp-unpackerYYYYMMDD-XXXX-xxxxxxx ~~~ The default install location of a puppet 4.0+ module is: ~~~ C:\ProgramData\PuppetLabs\code\environments\production\modules ~~~ In using the Temp directory instead we allow for longer path names in the modules. Instead of using over 90 characters before the module path, we only use around 60, allowing for longer module paths during unpacking.

      Description

      Description

      If a user attempts to install the DSC module from the Forge the installation will fail:

      Notice: Preparing to install into C:/ProgramData/PuppetLabs/code/environments/production/modules ...
      Notice: Downloading from https://forgeapi.puppetlabs.com ...
      Error: No such file or directory @ rb_sysopen - C:/ProgramData/PuppetLabs/puppet/cache/puppet-module/cache/tmp-unpacker20150713-2868-1k8nayj/puppetlabs-dsc-0.1.1-b20025-dd8e40f3/vendor/DSCResources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollectionConfiguration/MSFT_xRDSessionCollectionConfiguration.schema.mof
      Error: Try 'puppet help module install' for usage

      Attachments

      • PMT Debug Log

      Repro Steps

      1. Install Puppet Agent 1.2.1 on agent node.
      2. Install "puppetlabs-dsc" module on agent:

        puppet module install puppetlabs-dsc --module_repository https://api-module-staging.puppetlabs.com

      Expect

      The module should install successfully.

      Actual

      The module installation fails:

      Notice: Preparing to install into C:/ProgramData/PuppetLabs/code/environments/production/modules ...
      Notice: Downloading from https://forgeapi.puppetlabs.com ...
      Error: No such file or directory @ rb_sysopen - C:/ProgramData/PuppetLabs/puppet/cache/puppet-module/cache/tmp-unpacker20150713-2868-1k8nayj/puppetlabs-dsc-0.1.1-b20025-dd8e40f3/vendor/DSCResources/xRemoteDesktopSessionHost/DSCResources/MSFT_xRDSessionCollectionConfiguration/MSFT_xRDSessionCollectionConfiguration.schema.mof
      Error: Try 'puppet help module install' for usage

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  ryan.gard Ryan Gard
                  Reporter:
                  ryan.gard Ryan Gard
                  QA Contact:
                  Ryan Gard
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support