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

DISCOVERY-325: Add virtual_host_uuid #121

Merged
merged 1 commit into from Nov 14, 2023

Conversation

bruno-fs
Copy link
Contributor

virtual_host_uuid field is added to reflect the hypervisor identity (subiscription_manager_id) of a system's hypervisor (which is typically collected by virt-who).

https://issues.redhat.com/browse/DISCOVERY-325

@bruno-fs bruno-fs requested a review from a team as a code owner November 13, 2023 19:01
virtual_host_uuid field is added to reflect the hypervisor identity
(subiscription_manager_id) of a system's hypervisor (which is typically
collected by virt-who).

https://issues.redhat.com/browse/DISCOVERY-325
@dippy-bot
Copy link
Collaborator

Here are the System Profile validation results using Prod data.
Validating against the RedHatInsights/inventory-schemas master spec:

yupana:
	Pass: 280127
	Fail: 1

rhsm-system-profile-bridge:
	Pass: 10130
	Fail: 0

rhsm-conduit:
	Pass: 73253
	Fail: 0

puptoo:
	Pass: 134677
	Fail: 3

cloud-connector:
	Pass: 1809
	Fail: 0


Validating against this PR's spec:

yupana:
	Pass: 280127
	Fail: 1

rhsm-system-profile-bridge:
	Pass: 10130
	Fail: 0

rhsm-conduit:
	Pass: 73253
	Fail: 0

puptoo:
	Pass: 134677
	Fail: 3

cloud-connector:
	Pass: 1809
	Fail: 0


@dippy-bot
Copy link
Collaborator

Here are the System Profile validation results using Prod data.
Validating against the RedHatInsights/inventory-schemas master spec:

yupana:
	Pass: 283341
	Fail: 1

rhsm-system-profile-bridge:
	Pass: 9932
	Fail: 0

puptoo:
	Pass: 128883
	Fail: 4

rhsm-conduit:
	Pass: 75975
	Fail: 0

cloud-connector:
	Pass: 1864
	Fail: 0


Validating against this PR's spec:

yupana:
	Pass: 283341
	Fail: 1

rhsm-system-profile-bridge:
	Pass: 9932
	Fail: 0

puptoo:
	Pass: 128883
	Fail: 4

rhsm-conduit:
	Pass: 75975
	Fail: 0

cloud-connector:
	Pass: 1864
	Fail: 0


@dippy-bot
Copy link
Collaborator

Here are the System Profile validation results using Prod data.
Validating against the RedHatInsights/inventory-schemas master spec:

yupana:
	Pass: 273785
	Fail: 1

rhsm-system-profile-bridge:
	Pass: 7674
	Fail: 0

puptoo:
	Pass: 131119
	Fail: 5

cloud-connector:
	Pass: 1390
	Fail: 0

rhsm-conduit:
	Pass: 86026
	Fail: 0


Validating against this PR's spec:

yupana:
	Pass: 273785
	Fail: 1

rhsm-system-profile-bridge:
	Pass: 7674
	Fail: 0

puptoo:
	Pass: 131119
	Fail: 5

cloud-connector:
	Pass: 1390
	Fail: 0

rhsm-conduit:
	Pass: 86026
	Fail: 0


@dippy-bot
Copy link
Collaborator

Here are the System Profile validation results using Prod data.
Validating against the RedHatInsights/inventory-schemas master spec:

yupana:
	Pass: 268826
	Fail: 1

rhsm-conduit:
	Pass: 92178
	Fail: 0

rhsm-system-profile-bridge:
	Pass: 5323
	Fail: 0

puptoo:
	Pass: 131943
	Fail: 9

cloud-connector:
	Pass: 1720
	Fail: 0


Validating against this PR's spec:

yupana:
	Pass: 268826
	Fail: 1

rhsm-conduit:
	Pass: 92178
	Fail: 0

rhsm-system-profile-bridge:
	Pass: 5323
	Fail: 0

puptoo:
	Pass: 131943
	Fail: 9

cloud-connector:
	Pass: 1720
	Fail: 0


@kruai
Copy link
Contributor

kruai commented Nov 14, 2023

Hmm, dippy-bot leaving multiple comments in a row is a new one. I'll look into that.
Don't worry about the linting issues - that's being investigated

@kruai kruai merged commit 77662fd into RedHatInsights:master Nov 14, 2023
@bruno-fs bruno-fs deleted the discovery-325 branch November 14, 2023 17:28
Sgitario added a commit to RedHatInsights/rhsm-subscriptions that referenced this pull request Feb 19, 2024
…_uuid (#3043)

Jira issue: [SWATCH-1929](https://issues.redhat.com/browse/SWATCH-1929)

## Description
Add support for the recently added system profile fact virtual_host_uuid
(RedHatInsights/inventory-schemas#121) which
replaces legacy facts rhsm.VM_HOST_UUID.

## Testing
1.- podman-compose up
2.- Create hosts for orgId=16790890 in Insights database

```
./bin/insert-mock-hosts --hbi --clear --org 16790890 --account account123 --num-guests 1 --hypervisor-id 123456
```
3.- DEV_MODE=true SUBSCRIPTION_SYNC_ENABLED=true
ENABLE_SYNCHRONOUS_OPERATIONS=true ./gradlew :bootRun
4.- Perform tally snapshot:

```bash
http PUT ":8000/api/rhsm-subscriptions/v1/internal/rpc/tally/snapshots/16790890" \
Origin:console.redhat.com \
x-rh-swatch-synchronous-request:true \
x-rh-swatch-psk:placeholder \
x-rh-identity:$(echo -n '{"identity":{"account_number":"","type":"User","user":{"is_org_admin":true},"internal":{"org_id":"16790890"}}}' | base64 -w 0)
```

5.- Query the created hosts in the swatch database and confirm the
virtual_host_uuid has been used:

`SELECT hypervisor_uuid FROM hosts;`

It should be 123456.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants