Bug 1663217 - [RFE] Add RHV VM name to the matching between Satellite's content host to RHV (currently only VM FQDN is used)
Summary: [RFE] Add RHV VM name to the matching between Satellite's content host to RHV...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.2.7
Hardware: All
OS: Linux
medium
medium
Target Milestone: ovirt-4.5.1
: ---
Assignee: Artur Socha
QA Contact: Petr Kubica
URL:
Whiteboard:
Depends On: 1857866
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-03 13:01 UTC by Ulhas Surse
Modified: 2022-07-14 12:55 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
The hostname and/or FQDN of the VM or VDSM host can change after a virtual machine (VM) is created. Previously, this change could prevent the VM from fetching errata from Red Hat Satellite/Foreman. With this enhancement, errata can be fetched even if the VM hostname or FQDN changes.
Clone Of:
Environment:
Last Closed: 2022-07-14 12:54:30 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:5555 0 None None None 2022-07-14 12:55:15 UTC
oVirt gerrit 107284 0 master MERGED engine: match erratas for vm by fqdn and id 2021-02-21 12:17:40 UTC

Description Ulhas Surse 2019-01-03 13:01:46 UTC
Description of problem:

After integrating satellite in RHV, the errata tab of a virtual machine is not showing available errata from the satellite whereas the same is available in the satellite content hosts tab. 

This is an observation when the VM name is different to the name of a content host in satellite (which is an FQDN). 

There is a match happening between a content hostname from satellite and vm name in RHV but only the FQDN should be matched as per the documentation. 

https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.2/html/virtual_machine_management_guide/Configuring_Satellite_Errata


Version-Release number of selected component (if applicable):
RHV 4.2.7/ satellite 6.2

How reproducible:
Always

Steps to Reproduce:
1. Integrate satellite In RHV and register hosts and VMs
2. Check the errata tab in satellite (errata/ bug fix available)
3. Check in the errata tab in RHV VM sub tabs, no errata information

Since the name in the satellite is FQDN and name of the VM is something different, the match is not happening, and when we change the VM name same as the FQDN in the RHV, the errata tab shows the information of bug fix and etc. 

Actual results:
Errata tab in RHV is not showing required information.

Expected results:
Errata tab in RHV should show the required information with different name reading FQDN only. 

Additional info:

Comment 25 Petr Kubica 2021-04-07 13:03:35 UTC
Hi

just tried it and it is not working. 
I can clearly see that in Satellite facts are reported and there is an erratum available.

Did a little bit digging around:
xx.xx.xx.xx - - [07/Apr/2021:13:36:08 +0200] "GET /api/v2/status HTTP/1.1" 200 65 "-" "Java/11.0.10"
xx.xx.xx.xx - - [07/Apr/2021:13:36:08 +0200] "GET /api/v2/hosts?search=facts.dmi::system::uuid=<UUID CENSORED>&format=json HTTP/1.1" 200 210 "-" "Java/11.0.10"
xx.xx.xx.xx - - [07/Apr/2021:13:36:08 +0200] "GET /api/v2/hosts?search=facts.network::fqdn=<FQDN CENSORED>&format=json HTTP/1.1" 200 211 "-" "Java/11.0.10"
xx.xx.xx.xx - - [07/Apr/2021:13:36:08 +0200] "GET /api/v2/hosts?search=facts.network::hostname=satellite-fqdn-vm&format=json HTTP/1.1" 200 191 "-" "Java/11.0.10"

Satellite API:
{
  "total": 15,
  "subtotal": 0,
  "page": 1,
  "per_page": 20,
  "search": "facts.dmi::system::uuid=<UUID CENSORED>",
  "sort": {
    "by": null,
    "order": null
  },
  "results": []
}

but this:
https://<SATELLITE FQDN>/api/v2/hosts?search=facts.uuid=%22<UUID CENSORED>%22
{
  "total": 15,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": "facts.uuid = \"<UUID CENSORED>\"", <-- here is necessary to have escaped quotes 
  "sort": {
    "by": null,
    "order": null
  },
  "results": [ <found a correct result> ]
}


Also simillar with network search:
https://<SATELLITE FQDN>/api/v2/hosts?search=facts.networking::fqdn=<FQDN CENSORED>
{
  "total": 15,
  "subtotal": 0,
  "page": 1,
  "per_page": 20,
  "search": "facts.network::fqdn=<FQDN CENSORED>",
  "sort": {
    "by": null,
    "order": null
  },
  "results": []
}

and correct one:
https://<SATELLITE FQDN>/api/v2/hosts?search=facts.networking::fqdn=<FQDN CENSORED>
{
  "total": 15,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": "facts.networking::fqdn=<FQDN CENSORED>",
  "sort": {
    "by": null,
    "order": null
  },
  "results": [ <found a correct result> ]
}

Also it's possible to get a VM with MAC address:
https://<SATELLITE FQDN>/api/v2/hosts?search=facts.networking::mac=<MAC ADDRESS>
or IP
https://<SATELLITE FQDN>/api/v2/hosts?search=facts.networking::ip=<IP ADDRESS>


About the last one:
/api/v2/hosts?search=facts.network::hostname=satellite-fqdn-vm
I didn't find a way how to get it useful. 
- Satellite in this case is not managing the DNS or would have to ensure that in RHV VM name == hostname
- In case that Satellite is managing the DNS user has to ensure that RHV VM name == Satellite Host name

Please let me know if this is the case and the desired behavior. For now I'm moving it back to ASSIGNED

Comment 27 Yaniv Kaul 2021-10-06 12:41:28 UTC
Given that it failed QE, do we want to fix this properly, or just close-wontfix?

Comment 28 Martin Perina 2021-10-06 13:03:18 UTC
I believe the issue is fixed, but we have a gap in documentation. Anyway we are discussing these to get into a conclusion and finally close it as fixed.

Comment 31 Sandro Bonazzola 2022-03-29 16:16:40 UTC
We are past 4.5.0 feature freeze, please re-target.

Comment 32 Michal Skrivanek 2022-05-25 11:31:47 UTC
We believe it worked, just the prerequisities hasn't been met.
please retest and if it still doesn't work provide more details or access info

Comment 37 Petr Kubica 2022-06-22 15:02:02 UTC
Verified in ovirt-engine-4.5.0.7-0.9.el8ev.noarch

Now it is possible to see errata in the VM, tested with Satellite 6.10 
(FQDN and VM name don't match)

Comment 42 errata-xmlrpc 2022-07-14 12:54:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: RHV Manager (ovirt-engine) [ovirt-4.5.1] security, bug fix and update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5555


Note You need to log in before you can comment on or make changes to this bug.