Bug 2051891

Summary: vCPUs in RHV getting reset to one vCPU after editing a host in Satellite
Product: Red Hat Satellite Reporter: Stefan Meyer <smeyer>
Component: Compute Resources - RHEVAssignee: aabramov
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.10.2CC: orabin, pcreech, rlavi, zhunting
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fog_ovirt v2.0.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-16 13:33:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stefan Meyer 2022-02-08 10:01:05 UTC
Description of problem:
- The vCPUs in RHV are getting reset to one vCPU after editing a host in Satellite

Version-Release number of selected component (if applicable):
- Satellite 6.8.6
- Satellite 6.10.2
- RHV 4.4.9.5

How reproducible:
Whenever a host is edited in Satellite

Steps to Reproduce:
1. Set vCPU in RHV from 1 to 2
2. Go to edit page of the host in Satellite
3. Check how many vCPUs are assigned in the Virtual Machine tab, all fields are grayed out but it should show 2 vCPU
4. Save without changing anything
5. The ammount of vCPUs in RHV has now changed to 1 vCPU


Actual results:
- Satellite overrides the ammount of vCPUs that may have been changed in RHV
- If the memory has changed it is not changed by Satellite

Expected results:
- Satellite should not override the ammount of assigned vCPU after initial installation

Additional info:
- I was not able to reproduce this when using "hammer host update"
- Assigning a new hostgroup from the "All Hosts" page does not trigger the reset

Comment 4 aabramov 2022-02-09 09:35:23 UTC
Created redmine issue https://projects.theforeman.org/issues/34422 from this bug

Comment 6 Stefan Meyer 2022-02-09 15:22:04 UTC
The fix from https://github.com/fog/fog-ovirt/pull/104 has been successfully tested on
- Satellite 6.8.6
- Satellite 6.10.2
- Satellite 7.0 Snap 8

While 6.8 is out of maintenance support I like to request a backport to 6.9 and 6.10 for it.

Comment 7 Bryan Kearney 2022-02-17 16:06:38 UTC
Upstream bug assigned to aabramov

Comment 8 Bryan Kearney 2022-02-17 16:06:40 UTC
Upstream bug assigned to aabramov

Comment 13 Lukáš Hellebrandt 2022-09-07 13:14:01 UTC
Verified with Sat 6.12 snap 9.0.

1) I created a VM through Satellite, have it running. It has 3 vCPUs (as per both Satellite and RHV).
2) I edited the VM in Satellite (Hosts -> <host> -> Edit), left vCPUs intact (it can't be edited anyway as it's greyed out). Submitted the form. It still has 3 vCPUs.
3) I shut the VM down through Satellite and did 2) again. It still has 3 vCPUs.
4) I edited the VM through RHV to have 5 vCPUs. It now shows 5 vCPUs both in RHV and in Satellite's edit form (greyed out).
5) I did 2) again. It still has 5 vCPUs.
6) I edited through Hammer:
```
# hammer host update --name <name> --comment 'Nobody expects the Spanish inquisition.'
Host updated.
```
It still has 5 vCPUs.

Comment 17 errata-xmlrpc 2022-11-16 13:33:25 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 (Important: Satellite 6.12 Release), 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:8506