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

(FACT-2816) - Fix ec2 fact issues when on non ec2 systems #2106

Merged
merged 1 commit into from
Sep 28, 2020

Conversation

logicminds
Copy link
Contributor

@logicminds logicminds commented Sep 25, 2020

  • previously when ec2 facts are executed the check_product_name
    was run which incorrectly returned a hash of values when the product
    name did not exist in the hypervisor hash. This is an edge case
    on linux systems not in ec2.

This caused errors messages how hashes cannot be converted since the expected value was supposed to be a string.

-E, [2020-09-27T18:11:08.838323 #26186] ERROR -- : Facter::InternalFactManager - undefined method `each' for nil:NilClass

lib/ruby/gems/2.7.0/gems/facter-4.0.39/lib/facter/facts/linux/ec2_userdata.rb:21: warning: deprecated Object#=~ is called on Hash; it always returns nil
E, [2020-09-27T18:11:08.916334 #26186] ERROR -- : Facter::InternalFactManager - undefined method `map' for nil:NilClass

E, [2020-09-27T18:11:08.916802 #26186] ERROR -- : Facter::InternalFactManager - undefined method `each' for nil:NilClass

@logicminds logicminds requested review from a team September 25, 2020 04:55
@logicminds
Copy link
Contributor Author

logicminds commented Sep 25, 2020

🏷️ bugfix
🏷️ community

Adding labels are greyed out and I don't have permission to add.

@oanatmaria
Copy link
Contributor

Hi @logicminds,

First of all i want to thank you for your contribution and for reporting this issue. I've created this ticket to track this bug.

Could you please fill up some details in the ticket above (like with what version of Facter this bug was found, the os you found the issue on and a short description about the wrong output of Facter)? Also can you change the commit message to indicate to that Jira ticket, something like: (FACT-2816) Fix ec2 fact on non ec2 systems?

@puppetcla
Copy link

CLA signed by all contributors.

  * previously when ec2 facts are executed the check_product_name
    was run which incorrectly returned a hash of values when the product
    name did not exist in the hypervisor hash. This is an edge case
    on linux systems not in ec2.
@logicminds
Copy link
Contributor Author

logicminds commented Sep 27, 2020

All items have been addressed. Please review. @oanatmaria

@logicminds logicminds changed the title Fix ec2 fact issues when on non ec2 systems (FACT-2816) - Fix ec2 fact issues when on non ec2 systems Sep 27, 2020
@oanatmaria oanatmaria merged commit 0a2f78f into puppetlabs:main Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants