Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Could not set 'present' on ensure: uninitialized constant Win32::Registry::KEY_WOW64_64KEY #70

Merged
merged 1 commit into from
Jun 22, 2020

Conversation

cmchoi2000
Copy link
Contributor

Removed Reg key check.

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

@RandomNoun7
Copy link

Context

PR fixes the following issue

Error: /Stage[main]/Surfscan::Test_env/Windows_env[Add somecode]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: uninitialized constant Win32::Registry::KEY_WOW64_64KEY
Did you mean?  KEY_WOW64_64KEY (file: /etc/puppetlabs/code/environments/production/site/<snip>/manifests/test_env.pp, line: 2)

In some environments the top scope KEY_WOW64_64KEY variable is already defined in another scope, but the module only ever references the namespaced Win32::Registry::KEY_WOW64_64KEY constant, which is now not defined.

The Puppetlabs registry module already ran into this bug a while back and used this same strategy to fix it.

@bastelfreak bastelfreak added the bug Something isn't working label Jun 22, 2020
Copy link

@RandomNoun7 RandomNoun7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved on the basis of:

  1. The fix was manually tested at the customer site and fixed the issue with no discernable side effects
  2. This same fix was implemented in the puppetlabs-registry module back in January 2017 without issue.

@bastelfreak
Copy link
Contributor

Hi @cmchoi2000, thanks for the PR! The change itself looks good, but can you please update the pull request title to briefly describe what/why it got changed? Afterwards we can merge it and do a new release.

@bastelfreak bastelfreak added the needs-work not ready to merge just yet label Jun 22, 2020
@cmchoi2000
Copy link
Contributor Author

cmchoi2000 commented Jun 22, 2020 via email

@RandomNoun7
Copy link

@cmchoi2000 No, you don't need to resubmit. You can open the PR web page and click on the title. When you click on the title it will turn into a text box you can edit directly.

@cmchoi2000
Copy link
Contributor Author

cmchoi2000 commented Jun 22, 2020 via email

@RandomNoun7
Copy link

@cmchoi2000 At the bottom of the emails you are recieving is a link that says view it on GitHub. Click that link and it will take you directly to the Pull Request page where you can click on the title and edit it.

@cmchoi2000 cmchoi2000 changed the title Update windows_env.rb. Fix: Could not set 'present' on ensure: uninitialized constant Win32::Registry::KEY_WOW64_64KEY Jun 22, 2020
@cmchoi2000
Copy link
Contributor Author

cmchoi2000 commented Jun 22, 2020 via email

@bastelfreak bastelfreak removed the needs-work not ready to merge just yet label Jun 22, 2020
@bastelfreak bastelfreak merged commit 6ad5a86 into puppetlabs:master Jun 22, 2020
@Ramesh7 Ramesh7 added the bugfix label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants