Bug 1343934

Summary: CPU Profile is not assigned when changing it on a running VM
Product: [oVirt] ovirt-engine Reporter: Roman Mohr <rmohr>
Component: Backend.CoreAssignee: Roman Mohr <rmohr>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: medium    
Version: 3.6.7CC: bugs, dfediuck, gklein, mavital, mgoldboi, michal.skrivanek, rmohr, tjelinek, ylavi
Target Milestone: ovirt-4.0.2Keywords: Triaged
Target Release: 4.0.2.4Flags: rule-engine: ovirt-4.0.z+
mgoldboi: exception+
rule-engine: planning_ack+
dfediuck: devel_ack+
mavital: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1361500 (view as bug list) Environment:
Last Closed: 2016-08-12 14:30:32 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:
Bug Depends On:    
Bug Blocks: 1361500    

Description Roman Mohr 2016-06-08 11:08:47 UTC
Description of problem:
When changing the CPU profile on a running VM you get notified that the profile only takes effect after a VM restart. After klicking OK the VM gets the symbol assign which indicates that there is a configuration update which did not jet take effect.

When checking the VM config again you see that the CPU profile is still the old one. Also a VM restart keeps the old profile.

Doing the changes on a VM which is down work as expected.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. Create a second CPU profile
2. Create and start a VM
3. Edit the VM and set the new CPU profile
4. Restart the VM to make the new CPU profile effective
5. The VM still has the old CPU profile

Actual results:
There is way to edit the CPU profile on a running VM. The change just gets lost.
It is not live updated and it is not persisted for later VM starts.

Expected results:
The CPU profile should be live updated on the running VM and saved to the database.


Additional info:

Comment 1 Red Hat Bugzilla Rules Engine 2016-06-09 07:32:38 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 2 Yaniv Lavi 2016-07-21 12:58:14 UTC
Should this be modified?

Comment 3 Tomas Jelinek 2016-07-29 07:42:00 UTC
I think this causes this regression: https://bugzilla.redhat.com/show_bug.cgi?id=1361366

Comment 4 Michal Skrivanek 2016-07-29 09:20:26 UTC
on top of that, looking at the patch it doesn't seem to me it's actually fixing the problem completely. profile is live refreshed when the VM is in "Up" status, yet it can be edited in all other states when VM is running(PoweringUp, etc) and such change is going to be ignored for that run

Comment 5 Roman Mohr 2016-08-02 13:58:10 UTC
(In reply to Michal Skrivanek from comment #4)
> on top of that, looking at the patch it doesn't seem to me it's actually
> fixing the problem completely. profile is live refreshed when the VM is in
> "Up" status, yet it can be edited in all other states when VM is
> running(PoweringUp, etc) and such change is going to be ignored for that run

Whenever the VM changes it state to UP, VmsMonitoring is triggering the right VDS event to refresh QoS on the VM.

Comment 6 Artyom 2016-08-07 08:49:11 UTC
Verified on rhevm-4.0.2.4-0.1.el7ev.noarch

1) Create two cluster profiles with CPU QoS 10 and 20
2) Attach CPU profile with QoS 10 to VM
3) Start VM
4) Check via virsh VM QoS:
 <metadata xmlns:ovirt="http://ovirt.org/vm/tune/1.0">
    <ovirt:qos xmlns:ovirt="http://ovirt.org/vm/tune/1.0">
        <ovirt:vcpuLimit>10</ovirt:vcpuLimit>
    </ovirt:qos>
 </metadata>
5) Change VM CPU profile with QoS 20
6) Check via virsh VM QoS:
<metadata xmlns:ovirt="http://ovirt.org/vm/tune/1.0">
    <ovirt:qos xmlns:ovirt="http://ovirt.org/vm/tune/1.0">
        <ovirt:vcpuLimit>20</ovirt:vcpuLimit>
</ovirt:qos>
  </metadata>