salt
salt copied to clipboard
Correctly detect Nutanix AHV as virtual
What does this PR do?
Correctly detect Nutanix AHV as virtual in grains.virtual on CentOS/RHEL using virt-what.
What issues does this PR fix or reference?
Fixes: Nutanix AHV is detected as physical by grains.virtual
Previous Behavior
Nutanix AHV did not get detected as virtual but physical, since the keyword nutanix_ahv was not present as a qualified virtual machine.
New Behavior
Nutanix AHV is detected as virtual with the name Nutanix. Tested with CentOS 7 and CentOS 8 Stream
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
- [ ] Docs
- [ ] Changelog - https://docs.saltproject.io/en/master/topics/development/changelog.html
- [ ] Tests written/updated
Commits signed with GPG?
No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
- Community Wiki
- Salt’s Contributor Guide
- Join our Community Slack
- IRC on LiberaChat
- Salt Project YouTube channel
- Salt Project Twitch channel
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!
Given that AHV runs on KVM, perhaps grains['virtual']
should be set to kvm
and grains['virtual_subtype']
should be set to either ahv
or nutanix
?
@rolo9707 see comment by @ggiesen I do agree with his assessment. also, can you fix the conflict?
@rolo9707 just noticed this is going to need a changelog and tests as well.
@rolo9707 did you see the update requests above?
Hi.
I am sorry, but I do not know how and where to add changelog and tests.
Best regards, Ronny
tir. 6. des. 2022 kl. 10:17 skrev Thomas Phipps @.***>:
@rolo9707 https://github.com/rolo9707 did you see the update requests above?
— Reply to this email directly, view it on GitHub https://github.com/saltstack/salt/pull/62387#issuecomment-1339012880, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEZEKPEYWQG6A2KWEFKRDTWL4ADFANCNFSM54YEMEMQ . You are receiving this because you were mentioned.Message ID: @.***>
Hi. I am sorry, but I do not know how and where to add changelog and tests. Best regards, Ronny tir. 6. des. 2022 kl. 10:17 skrev Thomas Phipps @.>: … @rolo9707 https://github.com/rolo9707 did you see the update requests above? — Reply to this email directly, view it on GitHub <#62387 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEZEKPEYWQG6A2KWEFKRDTWL4ADFANCNFSM54YEMEMQ . You are receiving this because you were mentioned.Message ID: @.>
changelog instructions can be found at https://docs.saltproject.io/en/latest/topics/development/changelog.html
as for tests they go under the tests directory preferably under pytest after that. there should be unit tests under there for the core grain.
But more importantly there is a merge conflict that needs to be addressed.
Closing this due to inactivity. Anyone should feel free to re-open it if they want to see it through to the end in one release cycle.