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

Set virtual grain in Podman systemd container #67734

Open
wants to merge 3 commits into
base: 3006.x
Choose a base branch
from

Conversation

tacerus
Copy link
Contributor

@tacerus tacerus commented Feb 12, 2025

What does this PR do?

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

What issues does this PR fix or reference?

Fixes #67733

Previous Behavior

# systemd-detect-virt
podman

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

New Behavior

# systemd-detect-virt
podman

# 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

Please review Salt's Contributing Guide for best practices, including the
PR Guidelines.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@tacerus tacerus force-pushed the podman branch 2 times, most recently from 9fe0d45 to cf504a0 Compare February 12, 2025 17:40
@tacerus tacerus marked this pull request as ready for review February 12, 2025 17:40
@tacerus tacerus requested a review from a team as a code owner February 12, 2025 17:40
twangboy
twangboy previously approved these changes Feb 12, 2025
@tacerus
Copy link
Contributor Author

tacerus commented Feb 19, 2025

Rebased onto 3006.x as per request in #67733 (comment).

@dwoz
Copy link
Contributor

dwoz commented Feb 20, 2025

The pre-commit failure needs to be addressed: https://github.com/saltstack/salt/actions/runs/13425907781/job/37510729265?pr=67734

@tacerus
Copy link
Contributor Author

tacerus commented Feb 20, 2025

Hi @dwoz, thanks, I repaired it, however there was a conflict with 3006.x now because 1d4c12e wrote to changelog/67733.fixed.md even though #67733 is (from what I can tell) my issue, going by the PR introducing it (#67723) I think they meant #67722 instead, hence I overwrote the changelog file for my issue and moved theirs, hope that is fine.

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

Signed-off-by: Georg Pfuetzenreuter <[email protected]>
@tacerus
Copy link
Contributor Author

tacerus commented Feb 20, 2025

Seems the changelog file was repaired via 3b40940 in the meanwhile, so I rebased mine again.

@dmurphy18
Copy link
Contributor

@tacerus Sorry about the mistake with the changelog file, fixed it, and thanks for the PR, had just setup test environment when my attention was drawn to your PR

@tacerus
Copy link
Contributor Author

tacerus commented Feb 21, 2025

Ah, no worries. :)

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.

4 participants