Set virtual grain when virtual_subtype exists #52672
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
What does this PR do?
What it says on the tin. If we have a
virtual_subtype
then we're running under some kind of virtualization. We should set something specific (e.g. container, if it's a lxc or docker (i.e. linux container)), but I don't think there's any reason we should let it bephysical
when there's avirtual_subtype
What issues does this PR fix or reference?
Fixes #51451
Previous Behavior
It was possible to have
virtual = physical
grain whilevirtual_subtype
was set to something.New Behavior
Now for Docker and LXC the virtual type will be Container. I don't know if there's a better, more specific term that we can use.
And if
virtual_subtype
is set, but the virtual grain isphysical
, just set it to the non-specificvirtual
.Tests written?
Yes
Commits signed with GPG?
Yes