Skip to content

set virtual grain for docker using systemd and virt-what #67906

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

Merged
merged 1 commit into from
Apr 23, 2025

Conversation

furlongm
Copy link
Contributor

@furlongm furlongm commented Mar 21, 2025

What does this PR do?

Correctly handle the systemd-detect-virt and virt-what output to identify a
Docker container running systemd as what it is instead of as a physical machine.

What issues does this PR fix or reference?

Fixes #67905

Previous Behavior

# systemd-detect-virt
docker

# virt-what
docker

# salt-call --local grains.get virtual
local:
    physical

New Behavior

# systemd-detect-virt
docker

# virt-what
docker

# salt-call --local grains.get virtual
local:
    container

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

Copy link

welcome bot commented Mar 21, 2025

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:

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 saltproject.pdl@broadcom.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@furlongm furlongm force-pushed the docker branch 2 times, most recently from 05df3cf to 089fda9 Compare March 21, 2025 03:14
@furlongm furlongm changed the base branch from master to 3006.x March 21, 2025 03:16
@furlongm furlongm force-pushed the docker branch 2 times, most recently from 38cb30a to ec010cb Compare March 21, 2025 03:20
@furlongm furlongm marked this pull request as ready for review March 21, 2025 03:20
@furlongm furlongm requested a review from a team as a code owner March 21, 2025 03:20
@furlongm
Copy link
Contributor Author

@dmurphy18 this is similar to the podman issue #67733, lmk if anything else is required, thanks!

@furlongm
Copy link
Contributor Author

@dwoz would it be possible to get a review on this PR? Thanks.

@dwoz dwoz merged commit 7030d7f into saltstack:3006.x Apr 23, 2025
692 checks passed
Copy link

welcome bot commented Apr 23, 2025

Congratulations on your first PR being merged! 🎉

@furlongm furlongm deleted the docker branch April 23, 2025 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test:full Run the full test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[3006.x] Docker systemd container identified as physical
4 participants