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

Registry key values being truncated or superfluous newline present

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: PUP 7.0.0
    • Fix Version/s: None
    • Component/s: Modules, Windows
    • Labels:
      None
    • Template:
      PUP Bug Template
    • Agent OS:
      Windows Server 2012 (x64)
    • Team:
      Coremunity
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 7.0.0 (7.0.0.104.g28ab897c nightly)
      Puppet Server Version: n/a
      OS Name/Version: Windows 10 / Server 2012 R2 / Server 2016 / Server 2019

      Problem Description
      The acceptance tests in the puppetlabs-motd module are failing with the latest Puppet 7 nightly build (2020-07-27) due to the registry values being read back with either the last character being truncated or an additional newline character present:

      # ./spec/acceptance/motd_spec.rb:75
       1) Message of the day when static message from content 
           On host `profound-letter.delivery.puppetlabs.net'
           Failure/Error: idempotent_apply(pp)
           RuntimeError:
             apply manifest expected no changes
             ` puppet apply manifest_20200728_88010_1qq4dui.pp --trace --detailed-exitcodes`
             ====== Start output of Puppet apply with unexpected changes ======
             Notice: Compiled catalog for profound-letter.delivery.puppetlabs.net in environment production in 0.15 seconds
             Notice: /Stage[main]/Motd/Registry_value[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticecaption]/data: data changed 'Message of the da' to 'Message of the day'
             Notice: /Stage[main]/Motd/Registry_value[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\legalnoticetext]/data: data changed 'Hello world!' to "Hello world!\n"
             Notice: Applied catalog in 0.17 seconds
      

      'Message of the da' to 'Message of the day'
      

      'Hello world!' to "Hello world!\n"
      

      Steps to Reproduce:
      Clone the puppetlabs-motd module, then, append the following lines to the end of the provision.yaml:

      win_test:
        provisioner: abs
        images: ['win-2012r2-x86_64', 'win-2016-core-x86_64', 'win-2019-core-x86_64', 'win-10-pro-x86_64']
      

      Then run:

      bundle install
      bundle exec rake 'litmus:provision_list[win_test]'
      bundle exec rake 'litmus:install_agent[puppet7-nightly]'
      bundle exec rake 'litmus:install_module'
      bundle exec rake 'litmus:acceptance:parallel'
      

      Then please do not forget to tear down and hand back the hosts after you're done:

      bundle exec rake 'litmus:tear_down'
      

      Desired Behavior:
      All acceptance tests should pass on the module

      Actual Behavior:
      Acceptance tests fail due to registry values either being truncated or a superfluous new line character present.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              josh Josh Cooper
              Reporter:
              ciaran.mccrisken Ciaran McCrisken
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support