Bug 968362

Summary: webadmin: after ovirt-engine restart, if we do not reload the UI before log in, CanDoAction alerts will not appear for the user
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engine-webadmin-portalAssignee: Vojtech Szocs <vszocs>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, ecohen, iheim, jkt, Rhev-m-bugs, vszocs
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: ux
Fixed In Version: is14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-12 14:03:20 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:
Bug Depends On:    
Bug Blocks: 1078909, 1142926    
Attachments:
Description Flags
log none

Description Dafna Ron 2013-05-29 14:26:26 UTC
Created attachment 754423 [details]
log

Description of problem:

if we restart ovirt-engine service and log in to the webadmin without reloading the UI, all CanDoAction alerts will not appear to the user. 
the alerts will appear in engine log but the user will not see any error in the UI. 

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

sf17.2
firefox-17.0.5-2.el6.x86_64

How reproducible:

100%

Steps to Reproduce:
1. log in to webadmin
2. restart the ovirt-service
3. after the service is up go back to the webadmin and log in without reload of login screen. 
4. edit a running vm and try to change the memory while its running. 

Actual results:

dialogue will not close but there is no error displayed for the user. 
looking at the engine log we can see a CanDoAction is logged. 

Expected results:

we should see CanDoAction alerts. 

Additional info:

2013-05-29 17:13:59,370 WARN  [org.ovirt.engine.core.bll.UpdateVmCommand] (ajp-/127.0.0.1:8702-6) [42f6603e] CanDoAction of action UpdateVm failed. Reasons:VAR__ACTION__UPDATE,
VAR__TYPE__VM,VM_CANNOT_UPDATE_ILLEGAL_FIELD

Comment 1 Einav Cohen 2013-08-27 21:04:03 UTC
I cannot reproduce this on upstream (i.e. after engine restart, CanDoAction errors appear properly in the web-admin after re-login, even if I haven't reloaded the page in the browser).

I imagine that this is not reproducible in rhevm-3.3 either.

[problem originally reported on sf17.2, i.e. rhevm-3.2]

moving to ON_QA for QE to verify that it is indeed not reproducible in rhevm-3.3. If reproducible - please re-open, and BZ assignee will investigate.

Comment 2 Einav Cohen 2013-08-27 21:27:41 UTC
(In reply to Einav Cohen from comment #1)
> I cannot reproduce this on upstream (i.e. after engine restart, CanDoAction
> errors appear properly in the web-admin after re-login, even if I haven't
> reloaded the page in the browser).
> 
> I imagine that this is not reproducible in rhevm-3.3 either.
> 
> [problem originally reported on sf17.2, i.e. rhevm-3.2]
> 
> moving to ON_QA for QE to verify that it is indeed not reproducible in
> rhevm-3.3. If reproducible - please re-open, and BZ assignee will
> investigate.

strike that, I was able to reproduce this in ovirt-engine-3.3 (upstream) - perhaps it matters whether a setup has an apache proxy or not (in development environment, which is without an apache proxy AFAIK, the problem is not reproducible).
@Alex - please install latest rhevm-3.3 in order to try and reproduce that - I think that working in development environment in this case isn't enough.

Comment 3 Alexander Wels 2013-08-29 18:47:45 UTC
Just to give full reproduction steps:

1. Login into webadmin. Do an action that will generate a CanDoAction failure, for instance adding a network that already exists. This will show an error message (This step is important, otherwise it won't reproduce).
2. While logged in, restart the ovirt-engine. This might generate an error message popup, but will eventually get you back to the login page without interaction on your part.
3. Log back into the webadmin. Do the same or other action that will generate a CanDoAction failure. Notice the failure in the logs, but no message popping up.

I can reproduce this in both development mode as well as a standard installation. Apache has no influence on this. The fact that you created the failure before restarting the engine is what triggers this. Investigating the cause now.

Comment 4 David Botzer 2013-10-02 11:52:37 UTC
Fixed, 3.3/is16
According to instructions I am able to see CanDoAction actions alerts
And UI gives error message that can be closed

2013-10-02 14:49:13,693 ERROR [org.ovirt.engine.core.utils.ObjectIdentityChecker] (ajp-/127.0.0.1:8702-3) Field memSizeMb can not be updated when status is Up
2013-10-02 14:49:13,694 WARN  [org.ovirt.engine.core.utils.ObjectIdentityChecker] (ajp-/127.0.0.1:8702-3) ObjectIdentityChecker.IsUpdateValid:: Not updatable field 'memSizeMb' was updated
2013-10-02 14:49:13,694 WARN  [org.ovirt.engine.core.bll.UpdateVmCommand] (ajp-/127.0.0.1:8702-3) CanDoAction of action UpdateVm failed. Reasons:VAR__ACTION__UPDATE,VAR__TYPE__VM,VM_CANNOT_UPDATE_ILLEGAL_FIELD
2013-10-02 14:49:13,694 INFO  [org.ovirt.engine.core.bll.UpdateVmCommand] (ajp-/127.0.0.1:8702-3) Lock freed to object EngineLock [exclusiveLocks= key: RHEL64-orig value: VM_NAME
, sharedLocks= ]


Error while executing action:

RHEL64-orig:

    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.

Comment 6 Itamar Heim 2014-06-12 14:03:20 UTC
Closing as part of 3.4.0