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-3121) Detect Illumos (SmartOS/OmniOS) LX virtualization #2492

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

smokris
Copy link
Contributor

@smokris smokris commented May 10, 2022

See https://tickets.puppetlabs.com/browse/FACT-3121.

Facter uses virt-what's output which is lxc (on virt-what 1.20) or null (on virt-what 1.21+), so I added check_illumos_lx prior to retrieve_from_virt_what.

@smokris smokris requested a review from a team as a code owner May 10, 2022 17:46
@puppetlabs-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@CLAassistant
Copy link

CLAassistant commented May 10, 2022

CLA assistant check
All committers have signed the CLA.

@smokris
Copy link
Contributor Author

smokris commented May 10, 2022

(Hmm, the test failures don't seem to be related to the changes in this PR.)

Copy link

@bahamat bahamat left a comment

Choose a reason for hiding this comment

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

Hi, I’m one of the maintainers for SmartOS. It looks to me like the behavior presented here is desirable from our perspective. (Though, I have not evaluated this code functionally, I’ll leave that to those who are more familiar).

@smokris smokris changed the title (FACT-3121) Detect SmartOS LX virtualization (FACT-3121) Detect Illumos (SmartOS/OmniOS) LX virtualization May 11, 2022
@smokris
Copy link
Contributor Author

smokris commented Aug 20, 2023

Hi, @joshcooper. I saw that you merged some PRs in this repo over the last few months. Are you available to review this PR sometime soon?

@mhashizume mhashizume added the enhancement New feature or enhancement label Jan 11, 2024
@mhashizume
Copy link
Contributor

Closing and reopening to retrigger tests

@mhashizume mhashizume closed this Jan 11, 2024
@mhashizume mhashizume reopened this Jan 11, 2024
@mhashizume
Copy link
Contributor

Hi @smokris , thank you for your contribution and sorry for the delay.

Would you be able to rebase you PR and resolve the conflict?

Thank yoU!

@smokris smokris force-pushed the virtual-smartos-lx branch from a6107cb to d959b40 Compare January 18, 2024 20:44
@smokris
Copy link
Contributor Author

smokris commented Jan 18, 2024

@mhashizume, yes, I pushed d959b40 a few minutes ago, in which I've rebased onto current main, and squashed the 2 commits into 1 (since there's no need to preserve the name-change commit). Investigating test failures now…

@smokris smokris force-pushed the virtual-smartos-lx branch from d959b40 to 430d549 Compare January 18, 2024 23:54
@smokris
Copy link
Contributor Author

smokris commented Jan 18, 2024

GitHub CI is running the tests in a different random order each time, and the tests were failing intermittently depending on the order they ran. For example, bundle exec rspec --order random:47312 consistently failed, while bundle exec rspec --order random:36802 consistently passed.

If I understand correctly, the problem was that, if the test calls a resolver that isn't mocked, then the resolver will execute on the current system and cache its results (rather than merely returning the mocked results without caching), and the cached results break subsequent tests (even if mocked).

I pushed 430d549, which I think adds all the necessary mocks to enable the tests to pass regardless of order.

Copy link
Contributor

@mhashizume mhashizume left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @smokris !

@mhashizume
Copy link
Contributor

Closing and reopening to pick up new check

@mhashizume mhashizume closed this Feb 5, 2024
@mhashizume mhashizume reopened this Feb 5, 2024
@mhashizume mhashizume merged commit 3974869 into puppetlabs:main Feb 5, 2024
33 checks passed
@smokris smokris deleted the virtual-smartos-lx branch February 5, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants