Bug 1113503 - Cannot change comment of running VM with custom properties
Summary: Cannot change comment of running VM with custom properties
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-webadmin
Version: 3.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.5.0
Assignee: Shahar Havivi
QA Contact: Ilanit Stein
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-26 09:51 UTC by Markus Stockhausen
Modified: 2016-02-10 19:49 UTC (History)
10 users (show)

Fixed In Version: ovirt-3.5.0-beta2
Clone Of:
Environment:
Last Closed: 2014-10-17 12:23:08 UTC
oVirt Team: Virt
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 29889 0 ovirt-engine-3.4 ABANDONED ui: remove last delimiter in CustomProperties Never
oVirt gerrit 29891 0 master MERGED ui: remove last delimiter in CustomProperties Never
oVirt gerrit 30009 0 ovirt-engine-3.5 MERGED ui: remove last delimiter in CustomProperties Never

Description Markus Stockhausen 2014-06-26 09:51:41 UTC
Description of problem:

User cannot change the comment of a running VM. Occurs in our environment if VM type is Windows and console is spice. 

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

3.4.2

How reproducible:

100%

Steps to Reproduce:
1. Define VM
2. Start VM
3. Open VM config dialogue
4. Change comment (NOTHING ELSE!)
5. Press save

Actual results:

Error message: There was an attempt to change VM values while the VM is not down. Please shut down the VM in order to modify these properties.

Expected results:

Comment should be changeable

Additional info:

Works on Linux/VNC VMs perfectly.

Comment 1 Markus Stockhausen 2014-06-26 09:53:44 UTC
Maybe important info: Our Windows VMs have customer specific flags set. 

BUT: We do not modify those values when we change the comment.

Comment 2 Markus Stockhausen 2014-06-26 10:05:32 UTC
Test revealed: 

If custom properties are set (in our case self defined fields) the comment can no longer be changed on a running VM.

Comment 3 Shahar Havivi 2014-07-01 09:49:49 UTC
This bug is the cause of bz #1111565
In Add/Edit VM the qxl flag is setting to true in when we have spice and Linux - we need to set it only on Add VM not in edit (which cause this bug)
Closing this bug, fixing this issue in bz #1111565

*** This bug has been marked as a duplicate of bug 1111565 ***

Comment 4 Markus Stockhausen 2014-07-01 13:42:24 UTC
Sorry no duplicate. Nevertheless it is the same problem as in BZ1111565. Custom properties fields are not correctly handled when changing the running VM. 

This is the engine log:

2014-07-01 15:38:45,322 INFO  [org.ovirt.engine.core.bll.UpdateVmCommand] (ajp--127.0.0.1-8702-7) [4f41f5ce] Lock Acquired to object EngineLock [exclusiveLocks= key: colvm36 value: VM_NAME
, sharedLocks= ]
2014-07-01 15:38:45,331 ERROR [org.ovirt.engine.core.utils.ObjectIdentityChecker] (ajp--127.0.0.1-8702-7) [4f41f5ce] Field customProperties can not be updated when status is Up
2014-07-01 15:38:45,333 WARN  [org.ovirt.engine.core.utils.ObjectIdentityChecker] (ajp--127.0.0.1-8702-7) [4f41f5ce] ObjectIdentityChecker.IsUpdateValid:: Not updatable field 'customProperties' was updated
2014-07-01 15:38:45,335 WARN  [org.ovirt.engine.core.bll.UpdateVmCommand] (ajp--127.0.0.1-8702-7) [4f41f5ce] CanDoAction of action UpdateVm failed. Reasons:VAR__ACTION__UPDATE,VAR__TYPE__VM,VM_CANNOT_UPDATE_ILLEGAL_FIELD
2014-07-01 15:38:45,338 INFO  [org.ovirt.engine.core.bll.UpdateVmCommand] (ajp--127.0.0.1-8702-7) [4f41f5ce] Lock freed to object EngineLock [exclusiveLocks= key: colvm36 value: VM_NAME
, sharedLocks= ]
2014-07-01 15:39:25,281 INFO  [org.ovirt.engine.core.bll.UpdateVmCommand] (ajp--127.0.0.1-8702-3) [15dbbb94] Lock Acquired to object EngineLock [exclusiveLocks= key: colvm36 value: VM_NAME
, sharedLocks= ]
2014-07-01 15:39:25,296 ERROR [org.ovirt.engine.core.utils.ObjectIdentityChecker] (ajp--127.0.0.1-8702-3) [15dbbb94] Field customProperties can not be updated when status is Up
2014-07-01 15:39:25,311 WARN  [org.ovirt.engine.core.utils.ObjectIdentityChecker] (ajp--127.0.0.1-8702-3) [15dbbb94] ObjectIdentityChecker.IsUpdateValid:: Not updatable field 'customProperties' was updated
2014-07-01 15:39:25,328 WARN  [org.ovirt.engine.core.bll.UpdateVmCommand] (ajp--127.0.0.1-8702-3) [15dbbb94] CanDoAction of action UpdateVm failed. Reasons:VAR__ACTION__UPDATE,VAR__TYPE__VM,VM_CANNOT_UPDATE_ILLEGAL_FIELD
2014-07-01 15:39:25,340 INFO  [org.ovirt.engine.core.bll.UpdateVmCommand] (ajp--127.0.0.1-8702-3) [15dbbb94] Lock freed to object EngineLock [exclusiveLocks= key: colvm36 value: VM_NAME
, sharedLocks= ]

Comment 5 Shahar Havivi 2014-07-10 09:15:46 UTC
What are the custom properties that you are using?
I cannot reproduce this error when I set arbitrary custom properties.

Comment 6 Markus Stockhausen 2014-07-10 09:20:01 UTC
[root@node ~]# engine-config -a | grep UserDe
UserDefinedVMProperties:  version: 3.0
UserDefinedVMProperties:  version: 3.1
UserDefinedVMProperties:  version: 3.2
UserDefinedVMProperties:  version: 3.3
UserDefinedVMProperties: clock=^VM$;relax=^ON$; version: 3.4

Comment 7 Markus Stockhausen 2014-07-10 09:22:09 UTC
We have defined those flags to enable hv_relax option for Windows based VMs. This option might be obsolete in 3.5. Nevertheless I expect that custom properties do not block changing a comment on a running VM.

Comment 8 Markus Stockhausen 2014-07-10 09:24:03 UTC
The error occurs as soon as a VM has at least one of the two flags set.

Comment 9 Shahar Havivi 2014-07-10 09:59:13 UTC
Markus, 
I assume that the same configuration (Windows+Spice) without any custom properties is working?

Comment 10 Markus Stockhausen 2014-07-10 10:09:52 UTC
You are right.

I just verified it once again.

Online comment change fails if:
VM (Windows XP) with SPICE console WITH custom property "clock=VM"

Online comment change succeeds if:
VM (Windows XP) with SPICE console WITHOUT any custom property 

Logs still show the same content as in comment 4.

Comment 11 Markus Stockhausen 2014-07-10 10:15:35 UTC
And to make it even more clear I changed the console type to VNC. The error behaviour ist the same. VM properties attached (of the error case).

[oVirt shell (connected)]# show vm col...

id                                     : 803870d2-e365-4ab4-bdcc-4c1d25a03944
name                                   : col...
description                            : Some description
cluster-id                             : 99408929-82cf-4dc7-a532-9d998063fa95
comment                                : Some comment
cpu-architecture                       : X86_64
cpu-topology-cores                     : 1
cpu-topology-sockets                   : 1
cpu_shares                             : 0
creation_time                          : 2014-06-03 16:46:26.596000+02:00
custom_properties-custom_property-name : clock
custom_properties-custom_property-value: VM
delete_protected                       : False
display-address                        : 192.168.11.42
display-allow_override                 : True
display-keyboard_layout                : de
display-monitors                       : 1
display-port                           : 5900
display-single_qxl_pci                 : False
display-smartcard_enabled              : False
display-type                           : vnc
guest_info-fqdn                        : col....de
guest_info-ips-ip-address              : 192.168.9.136
guest_info-ips-ip-address              : 192.168.9.136
guest_info-ips-ip-address              : 192.168.9.136
high_availability-enabled              : False
high_availability-priority             : 1
host-id                                : 75048c1a-d33c-4257-bfb2-deebe009bd60
memory                                 : 3221225472
memory_policy-guaranteed               : 2147483648
migration_downtime                     : -1
origin                                 : rhev
os-boot-dev                            : hd
os-type                                : windows_xp
placement_policy-affinity              : migratable
placement_policy-host-id               : 75048c1a-d33c-4257-bfb2-deebe009bd60
sso-methods-method-id                  : GUEST_AGENT
start_time                             : 2014-07-10 12:11:17.138000+02:00
stateless                              : False
status-state                           : up
stop_time                              : 2014-07-10 12:10:46.302000+02:00

Comment 12 Ilanit Stein 2014-08-07 10:59:22 UTC
Verified on oVirt Engine Version: 3.5.0-0.0.master.20140804172041.git23b558e.el6

Comment 13 Sandro Bonazzola 2014-10-17 12:23:08 UTC
oVirt 3.5 has been released and should include the fix for this issue.


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