Bug 1504673 - Improve message for CLUSTER_CANNOT_UPDATE_VM_COMPATIBILITY_VERSION in UI
Summary: Improve message for CLUSTER_CANNOT_UPDATE_VM_COMPATIBILITY_VERSION in UI
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.2.3
: ---
Assignee: Tomas Jelinek
QA Contact: Jiri Belka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-20 11:28 UTC by Jiri Belka
Modified: 2018-05-10 06:33 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-05-10 06:33:31 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1566379 0 unspecified CLOSED [RFE] Provide infrastructure to copy user defined engine-config values to new cluster levels during y-stream upgrade 2022-01-18 11:23:34 UTC
oVirt gerrit 90258 0 master MERGED frontend: corrected misleading cluster update message 2020-05-20 09:43:19 UTC
oVirt gerrit 90295 0 ovirt-engine-4.2 MERGED frontend: corrected misleading cluster update message 2020-05-20 09:43:19 UTC

Internal Links: 1566379

Description Jiri Belka 2017-10-20 11:28:29 UTC
Description of problem:

In Admin portal I got:

~~~
Error while executing action: Update of cluster compatibility version failed because there are VMs/Templates [jbelka-test1] with incorrect configuration. To fix the issue, please go to each of them, edit and press OK. If the save does not pass, fix the dialog validation.
~~~

but it says much more in engine.log:

~~~
2017-10-06 18:28:35,611+02 WARN  [org.ovirt.engine.core.bll.UpdateVmCommand] (default task-14) [67c71ef7] Validation of action 'UpdateVm' failed for user admin@internal-authz. Reasons: VAR__A
CTION__UPDATE,VAR__TYPE__VM,ACTION_TYPE_FAILED_INVALID_CUSTOM_PROPERTIES_INVALID_KEYS,$MissingKeys alcohol,bananas
2017-10-06 18:28:35,667+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-14) [67c71ef7] EVENT_ID: CLUSTER_CANNOT_UPDATE_VM_COMPATIBILITY_VERSION(1
2,005), Cannot update compatibility version of Vm/Template: [jbelka-test1], Message: [No Message]
2017-10-06 18:28:35,705+02 ERROR [org.ovirt.engine.core.bll.UpdateClusterCommand] (default task-14) [67c71ef7] Transaction rolled-back for command 'org.ovirt.engine.core.bll.UpdateClusterComm
and'.
2017-10-06 18:28:35,726+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-14) [67c71ef7] EVENT_ID: USER_UPDATE_CLUSTER_FAILED(812), Failed to updat
e Host cluster (User: admin@internal-authz)
~~~

I would expect more meaningful message in web UI.

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

How reproducible:
100%

Steps to Reproduce:
- i have 4.1 cluster with vm
- created UserDefinedVMProperties for 4.1 cluster
- assigned this property to vm in 4.1 cluster
- i make UserDefinedVMProperties empty
- vm in 4.1 cluster still had the property in its settings (check in DB)
- increased cluster to 4.2

~~~
Error while executing action: Update of cluster compatibility version failed because there are VMs/Templates [jbelka-test1] with incorrect configuration. To fix the issue, please go to each of them, edit and press OK. If the save does not pass, fix the dialog validation.
~~~

- edit vm, save
- increase cluster to 4.2

<same error message as above>

Actual results:
not enough meaningful message in web UI

Expected results:
we know what's wrong in engine.log, show more meaningful message to users in web ui

Additional info:
https://bugzilla.redhat.com/show_bug.cgi?id=1432127#c7

Comment 2 Tomas Jelinek 2017-10-23 14:04:31 UTC
> 2017-10-06 18:28:35,611+02 WARN  [org.ovirt.engine.core.bll.UpdateVmCommand]
> (default task-14) [67c71ef7] Validation of action 'UpdateVm' failed for user
> admin@internal-authz. Reasons: VAR__A
> CTION__UPDATE,VAR__TYPE__VM,
> ACTION_TYPE_FAILED_INVALID_CUSTOM_PROPERTIES_INVALID_KEYS,$MissingKeys
> alcohol,bananas

you should get this message in audit log - is it not there?

Comment 3 Jiri Belka 2017-11-02 11:00:19 UTC
(In reply to Tomas Jelinek from comment #2)
> > 2017-10-06 18:28:35,611+02 WARN  [org.ovirt.engine.core.bll.UpdateVmCommand]
> > (default task-14) [67c71ef7] Validation of action 'UpdateVm' failed for user
> > admin@internal-authz. Reasons: VAR__A
> > CTION__UPDATE,VAR__TYPE__VM,
> > ACTION_TYPE_FAILED_INVALID_CUSTOM_PROPERTIES_INVALID_KEYS,$MissingKeys
> > alcohol,bananas
> 
> you should get this message in audit log - is it not there?

I was talking about admin portal. Or what do you mean with 'audit log'?

Comment 4 Tomas Jelinek 2017-11-03 09:03:16 UTC
in 4.2 it is under that bell icon in the right side (events and alerts notification)

Comment 5 Jiri Belka 2018-01-03 16:10:11 UTC
latest 4.2 d/s:

- in events in admin portal:

* Failed to update Host cluster (User: admin@internal-authz)
* Cannot update compatibility version of Vm/Template: [test3], Message: [No Message]

but engine.log is more talkative

2018-01-03 17:08:05,238+01 WARN  [org.ovirt.engine.core.bll.UpdateVmCommand] (default task-6) [6447f913] Validation of action 'UpdateVm' failed for user admin@internal-authz. Reasons: VAR__ACTION__UPDATE,VAR__TYPE__VM,ACTION_TYPE_FAILED_INVALID_CUSTOM_PROPERTIES_INVALID_KEYS,$MissingKeys foobar

Comment 7 Tomas Jelinek 2018-04-12 07:44:36 UTC
Other thing wrong with the message is that it says:

"To fix the issue, please go to each of them, edit and press OK. If the save does not pass, fix the dialog validation."

which is not correct, because it will try to edit it in the OLD compatibility level where the validations passes and the cluster update will subsequently fail again.
The correct message should be something like this:

"To fix the issue, please go to each of them, edit, change the Custom Compatibility Version of the VM to the new cluster level and press OK. If the save does not pass, fix the dialog validation."

Comment 8 Michal Skrivanek 2018-04-12 10:02:01 UTC
ack implementing comment #7
CustomProperties are tracked in bug 1566379 instead

Comment 9 Jiri Belka 2018-04-20 12:39:01 UTC
ok, based on #7 - ovirt-engine-webadmin-portal-4.2.3.2-0.1.el7.noarch

Error while executing action: Update of cluster compatibility version failed because there are VMs/Templates [test] with incorrect configuration. To fix the issue, please go to each of them, edit, change the Custom Compatibility Version of the VM/Template to the cluster level you want to update the cluster to and press OK. If the save does not pass, fix the dialog validation. After successful cluster update, you can revert your Custom Compatibility Version change.

Comment 10 Sandro Bonazzola 2018-05-10 06:33:31 UTC
This bugzilla is included in oVirt 4.2.3 release, published on May 4th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.3 release, it has been closed with a resolution of CURRENT RELEASE.

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


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