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

puppetlabs-registry : registry_value 'array' data type is not idempotent when blanking the value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: registry, windows
    • Labels:
    • Template:
      MODULES Bug Template
    • Team:
      Windows
    • Sprint:
      Windows 2019-01-23
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info

      Module Version: 1.1.3
      Puppet Version: 4.10.5 (PE 2017.2.3)
      OS Name/Version: Windows 2012r2

      I'm trying to set an array registry_value to have no value. I want the data to be blank. In trying this, I found that Puppet will set it to empty, but it's not idempotent. On every run, the Puppet output shows changed '' to ''. This only happens when the type is and array; it works fine with other types.

      Code that I've tried and all don't work as expected (either aren't idempotent or don't blank the value):

      registry_value { 'hklm:system\foo\bar':
        ensure => present,
        type   => 'array',
        data   => [],
      }
      

      registry_value { 'hklm:system\foo\bar':
        ensure => present,
        type   => 'array',
        data   => [''],
      }
      

      registry_value { 'hklm:system\foo\bar':
        ensure => present,
        type   => 'array',
        data   => '',
      }
      

      registry_value { 'hklm:system\foo\bar':
        ensure => present,
        type   => 'array',
        data   => undef,
      }
      

      registry_value { 'hklm:system\foo\bar':
        ensure => present,
        type   => 'array',
      }
      

      Desired Behavior:

      A REG_MULTI_SZ value created with no data or an existing REG_MULTI_SZ's data change to be empty. And for these actions to be idempotent.

      Actual Behavior:

      In most cases, the value is blanked out, but the operation is not idempotent

      The Puppet run output shows: changed '' to ''

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              glenn.sarti Glenn Sarti
              Reporter:
              nate.mccurdy Nate McCurdy
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support