Skip to content

Calculate UUID grain for Xen PV guests#69036

Open
ycedres wants to merge 4 commits into
saltstack:masterfrom
ycedres:calculate-uuid-grain-xen-pv-guest
Open

Calculate UUID grain for Xen PV guests#69036
ycedres wants to merge 4 commits into
saltstack:masterfrom
ycedres:calculate-uuid-grain-xen-pv-guest

Conversation

@ycedres

@ycedres ycedres commented May 4, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

On Linux systems running as Xen paravirtualized (PV) guests, standard DMI/SMBIOS tools (like dmidecode) may not be available or may not provide the correct hardware UUID. Instead, Xen provides this information via /sys/hypervisor/uuid.

This PR updates the core grains to prioritize reading the UUID from the Xen hypervisor path when it exists.

What issues does this PR fix or reference?

Tracks https://github.com/SUSE/spacewalk/issues/29298

Merge requirements satisfied?

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

Commits signed with GPG?

Yes

@ycedres ycedres force-pushed the calculate-uuid-grain-xen-pv-guest branch from d552f44 to 07bbaae Compare May 4, 2026 15:35
@ycedres ycedres marked this pull request as ready for review May 5, 2026 08:16
@ycedres ycedres requested a review from a team as a code owner May 5, 2026 08:16
ycedres and others added 3 commits May 27, 2026 22:44
The  unit test `test__hw_data_linux_empty` was failing because of existing
mocks for fopen in rb mode. Switching to rb does no harm because of the
use of `to_unicode` of the `/sys/hypervisor/uuid` file contents.
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.

3 participants