Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1478315

Summary: Empty quotaID for HE VM causes VM_CANNOT_UPDATE_HOSTED_ENGINE_FIELD
Product: Red Hat Enterprise Virtualization Manager Reporter: Jaroslav Spanko <jspanko>
Component: ovirt-engineAssignee: Yanir Quinn <yquinn>
Status: CLOSED ERRATA QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: high    
Version: 4.1.0CC: dfediuck, gwatson, lsurette, lveyde, mavital, mgoldboi, rbalakri, Rhev-m-bugs, srevivo, tnisan, ykaul
Target Milestone: ovirt-4.1.6Keywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.1.6.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-19 07:18:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jaroslav Spanko 2017-08-04 09:32:52 UTC
Description of problem:
Once the new quota is created in the HE env the HE VM is not editable anymore
VM_CANNOT_UPDATE_HOSTED_ENGINE_FIELD.

engine.log
2017-07-18 11:20:51,213+03 WARN  [org.ovirt.engine.core.bll.UpdateVmCommand] (default task-26) [d9a41128-3fdb-4d22-b446-9a0290f8eaa5] Validation of action 'UpdateVm' failed for user imalkin.local. Reasons: VAR__ACTION__UPDATE,VAR__TYPE__VM,VM_CANNOT_UPDATE_HOSTED_ENGINE_FIELD

byteman debug 
2017-07-25 09:52:44,272Z INFO  [stdout] (default task-9) isHostedEngineFieldUpdatable Argument: dbGeneration
2017-07-25 09:52:44,341Z INFO  [stdout] (default task-9) isHostedEngineFieldUpdatable Argument: interfaces
2017-07-25 09:52:44,342Z INFO  [stdout] (default task-9) isHostedEngineFieldUpdatable Argument: quotaEnforcementType
2017-07-25 09:52:44,342Z INFO  [stdout] (default task-9) isHostedEngineFieldUpdatable Argument: quotaId

So once the quota is created is not reflected to the HE VM
/usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "SELECT quota_id from vms where vm_guid in (SELECT vm_guid FROM vm_static where vm_name = 'HostedEngine');"
 quota_id 
----------

Version-Release number of selected component (if applicable):
RHV 4.x

How reproducible:
100%

Steps to Reproduce:
1. create quota
2. try to edit the HE VM
3.

Actual results:
HostedEngine: There was an attempt to change Hosted Engine VM values that are locked.

Expected results:
Add the quotaID to the HE VM

Additional info:

Comment 1 Doron Fediuck 2017-08-06 10:00:06 UTC
In general we do not limit HE since it's already confined by its own SD and its run time resources are important to keep it running.
What we need here is ti ensure we skip the quota tests for the HE VM and properly document this.

Comment 4 Artyom 2017-09-07 12:48:36 UTC
Verified on rhevm-4.1.6.2-0.1.el7.noarch

1) Deploy HE on 3 hosts
2) Add master storage domain
3) Change quota mode to audit and create new quota
4) Edit HE VM description

Comment 6 errata-xmlrpc 2017-09-19 07:18:50 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, 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/RHEA-2017:2749