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

undefined local variable or method `data' for Puppet::Provider::Package::Windows::Package:Class

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: PUP 4.0.0
    • Fix Version/s: PUP 4.3.2
    • Labels:
    • Environment:

      Windows 2012 R2 agent

    • Template:
    • Story Points:
      2
    • Sprint:
      Windows 2016-01-13
    • CS Priority:
      Reviewed
    • Release Notes Summary:
      Attempting to read REG_BINARY registry data would previously cause Puppet to crash on Windows. This no longer occurs.

      Description

      On a Windows 2012 R2 node, the command: "puppet resource package --trace"

      generates the following error:

      Debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does not exist
      Error: Could not run: undefined local variable or method `data' for Puppet::Provider::Package::Windows::Package:Class
      C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/windows/registry.rb:216:in `block in read'

      Line 216 in puppet/util/windows/registry.rb is this:
      result = [ type, data.read_bytes(0, byte_length) ]

      That line uses "data.read_bytes", but all the other lines in that case statement use "data_ptr.read_bytes". This appears to be an oversight.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ryan.gard Ryan Gard
                Reporter:
                tim.purkerson Tim Purkerson
                QA Contact:
                Ryan Gard
              • Votes:
                1 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support