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

Registry key values being truncated or superfluous newline present



    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Done
    • PUP 7.0.0
    • None
    • Modules, Windows
    • None
    • Coremunity
    • Needs Assessment
    • Needs Assessment


      Puppet Version: 7.0.0 ( 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)
             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:

        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.


        Issue Links



              josh Josh Cooper
              ciaran.mccrisken Ciaran McCrisken
              0 Vote for this issue
              2 Start watching this issue



                Zendesk Support