Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-4678

chocolatey : unable to set chocolateysource and other configuration with 0.10.4+

    XMLWordPrintable

Details

    • Needs Assessment

    Description

      Basic Info
      Module Version: any (2.0.2)
      Puppet Version: any
      OS Name/Version: All Windows

      In Chocolatey 0.10.4, we changed the way we update the config. I believe we used to rename the file then create a new one as part of updating the file. This allowed the old file to be locked. We've flipped to a bit more robust way of doing this in 0.10.4+, however it highlighted a flaw in the Puppet Chocolatey provider - chocolateysource, chocolateyfeature, and chocolateyconfig all tend to hold the config file locked to the Puppet process, so it is unable to be changed and results in errors

      Desired Behavior:
      There should be no error when attempting to set a source.

      Actual Behavior:

      The process cannot access the file because it is being used by another process

      C:\ProgramData\PuppetLabs>choco -version
      This is try 1/3. Retrying after 300 milliseconds.
       Error converted to warning:
       (32) The process cannot access the file because it is being used by another process: [\\?\C:\ProgramData\chocolatey\config\chocolatey.config]
      This is try 2/3. Retrying after 400 milliseconds.
       Error converted to warning:
       (32) The process cannot access the file because it is being used by another process: [\\?\C:\ProgramData\chocolatey\config\chocolatey.config]
      Maximum tries of 3 reached. Throwing error.
      Error deserializing response of type chocolatey.infrastructure.app.configuration.ConfigFileSettings:
       (32) The process cannot access the file because it is being used by another process: [\\?\C:\ProgramData\chocolatey\config\chocolatey.config]
      (32) The process cannot access the file because it is being used by another process: [\\?\C:\ProgramData\chocolatey\config\chocolatey.config]
      

      Attachments

        Issue Links

          Activity

            People

              glenn.sarti Glenn Sarti
              ferventcoder Rob Reynolds
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support