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

(maint) Add nil check for ec2 facts. #2042

Merged
merged 1 commit into from
Aug 24, 2020
Merged

(maint) Add nil check for ec2 facts. #2042

merged 1 commit into from
Aug 24, 2020

Conversation

BogdanIrimie
Copy link
Contributor

No description provided.

@BogdanIrimie BogdanIrimie added the bug Something isn't working label Aug 24, 2020
@BogdanIrimie BogdanIrimie requested review from a team August 24, 2020 10:46
@BogdanIrimie BogdanIrimie merged commit 463ddb1 into 4.x Aug 24, 2020
def aws?
private

def aws_hypervisors?
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the correct way to fix it? as this will return true for non-aws machines, so even if we are not an AWS we'll continue to resolve the fact knowing we're not on the right path.

Was facter 3 using dmidecode for this check?

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately there isn't a clean way to find out if it's aws. We can only check if the vm is on one of aws's hypervisors. Facter 3 does the same thing :

if (!virtualization || (virtualization->value() != vm::kvm && !boost::starts_with(virtualization->value(), "xen"))) {

@oanatmaria oanatmaria deleted the maint-fix-ec2 branch August 24, 2020 11:47
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