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

DSC - The "Package" Resource Fails when "ReturnCode" is Specified

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • None
    • dsc
    • Module Version: 0.8.1-b20094-dc9e38cb
      Puppet Agent Version: 1.2.2 (Gold)
      Agent: Windows 2012 R2 x64

    Description

      Description

      If a user specifies the "ReturnCode" parameter for the "Package" DSC resource the resource fails:

      Error: Parameter dsc_returncode failed on Dsc_package[package_test]: Invalid value '4'. Should be a string or an array of strings
      at line 1

      Attachments

      • None

      Repro Steps

      1. Install Puppet Agent on the Windows agent nodes.
      2. Install DSC module from the modules staging Forge on the agent nodes:

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

      3. Configure LCM refresh mode:

        puppet apply -e "dsc::lcm_config { 'disable_lcm': refresh_mode => 'Disabled' }"

      4. Download the test package onto the SUT.
      5. Apply the following manifest on the SUT:

        dsc_package {'package_test':
          dsc_ensure => 'Present',
          dsc_path => 'C:\test_program_installer.exe',
          dsc_name => 'Test Program',
          dsc_productid => '',
          dsc_arguments => '/S /D=C:\test_program',
          dsc_returncode => 4,
        }

      Expect

      The Puppet apply should complete successfully and install the test package.

      Actual

      The DSC module fails:

      Error: Parameter dsc_returncode failed on Dsc_package[package_test]: Invalid value '4'. Should be a string or an array of strings
      at line 1

      Attachments

        Issue Links

          Activity

            People

              ryan.gard Ryan Gard
              ryan.gard Ryan Gard
              Ryan Gard Ryan Gard
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support