-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 for Solaris virtual grain detection #55491
Conversation
Removed virtinfo "-a" arg, it is not supported in Solaris 11.4 Added virtinfo args to output a more exact virt type Added parsing of virtinfo output for "virtual" grain Moved subtype detection with the rest of the detection code Fixed "virtual_subtype" command to use correct command variable ("command" instead of "cmd") Added detection of zone subtypes
Re-added detection for Solaris 8/9/10 zones
Fixed call to os.path.isdir
@clallen sorry for the long delay. I've updated your PR: merged to the head of the current master resolving conflicts. Let's wait for tests. |
I don't mind writing a test, but I'm not sure what is required. Could you point me to an example? |
@clallen we already have a unit test for grains |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clallen I'm going to merge this in for Sodium. In the future we'll definitely need tests along with bug fixes like this.
@dwoz My apologies, I have not had much time to get familiar with the tests system. If there is anything else you need from me let me know. |
Nevermind, definately broken as it 'physical' now but doesn't seem to be this one that broke it. Can't figure out which one it is though 🤔 |
@sjorge is it easily reproducible? Could you try to bisect it and create a separate issue? |
Or either just create an issue describing reproduction steps, and we'll do it. |
Yep, already did #57714 I think I found what is going wrong, not yet why/when it changed. |
What does this PR do?
Fixes a bug that I inadvertently introduced in commit f7f8a8f, as well as adds better detection for zones on Solaris 11.
What issues does this PR fix or reference?
Issue #55444
Previous Behavior
When on a non-LDOM platform, the virtual grain would always detect as "LDOM", due to lack of adequate parsing of "virtinfo" command output.
New Behavior
Output of the "virtinfo" command is now parsed correctly, and detection of zones is more accurate.
Tests written?
Output of nox test unit.grains.test_core:
Commits signed with GPG?
No