Bug 781822 - oVirt - Web Admin: CanDoAction failure pop-up is shown after a false success pop-up
Summary: oVirt - Web Admin: CanDoAction failure pop-up is shown after a false success ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-webadmin
Version: unspecified
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: ---
: 3.1
Assignee: Tomas Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-15 13:12 UTC by Daniel Paikov
Modified: 2013-07-04 07:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-17 07:49:20 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description Daniel Paikov 2012-01-15 13:12:49 UTC
* Import a VM from import domain.
* Try importing the same VM again, which should fail on CanDoAction.
* First a (false) success pop-up is shown (with the text "Import process has begun for VM(s)...").
* After clicking on close, a CanDoAction failure pop-up is shown (with the text "Error... Import VM failed...").

The failure pop-up should be shown instead of the success pop-up. Showing both is illogical.

Comment 1 Einav Cohen 2012-01-15 13:25:13 UTC
The error pop-up is not necessarily an error that has been thrown during the CanDoAction phase; it might have been thrown during the execution phase, which is being executed in an async manner (therefore, blocking the success pop-up in this case is extremely problematic).

Can you please provide the exact text that was included in the error pop-up? a screen shot and engine-core logs in addition would also be appreciated.

Comment 2 Daniel Paikov 2012-01-15 15:12:42 UTC
The only relevant log for this action is:
2012-01-15 17:08:14,874 WARN  [org.ovirt.engine.core.bll.ImportVmCommand] (http--0.0.0.0-8080-10) CanDoAction of action ImportVm failed. Reasons:VM_CANNOT_IMPORT_VM_EXISTS,$VmName paikov-vdc-22,VAR__ACTION__IMPORT,VAR__TYPE__VM

The text of the first error:
Import process has begun for VM(s): . You can check import status in the 'Events' tab of the specific destination storage domain, or in the main 'Events' tab

The text of the second error:
Error:
<vm>:
    Import VM failed - VM Id already exist in the system. Please remove the VM (paikov-vdc-22) from the system first

Comment 3 Einav Cohen 2012-01-15 16:40:07 UTC
according to the info in Comment #2, it seems like the action hasn't succeeded for any of the VMs (since the list of VMs is empty).
In this case, the "Import Process has begun for VM(s)..." shouldn't appear at all.

Comment 4 Daniel Paikov 2012-01-16 07:20:39 UTC
The list of VMs isn't empty. I just replaced the name of the VM with <vm>.

Comment 5 Einav Cohen 2012-01-16 10:36:40 UTC
(In reply to comment #4)
> The list of VMs isn't empty. I just replaced the name of the VM with <vm>.

I am talking about the first message:
"Import process has begun for VM(s): . You can check import status in the
'Events' tab of the specific destination storage domain, or in the main
'Events' tab"

After the "... has begun for VM(s):" part, there was suppose to be a list of VM names for which the import process has started.
It seems to be empty.
Is it empty?
Or did you remove the list-of-VM-names part from the message when documenting it in Comment #2?

Comment 6 Daniel Paikov 2012-01-16 10:43:44 UTC
Whoops. Yes, this list is indeed empty.

Comment 7 Tomas Jelinek 2012-01-16 12:38:30 UTC
pushed patch for review: http://gerrit.ovirt.org/#change,1064

Comment 8 Tomas Jelinek 2012-01-17 10:51:58 UTC
merged to git: 578c3116750c4bb67351d4f0642744def4d8ef04

Comment 9 Daniel Paikov 2012-01-17 14:02:54 UTC
I'm not sure if the list being empty is an indication of anything. The list is also empty when the import action is successful. I'll open a separate bug on this issue.

Comment 10 Tomas Jelinek 2012-01-17 14:16:31 UTC
Well, calculating the list of VMs that can be imported was broken (always calculated, that no VMs can be). To fix the issue that the false success popup shows up it was also needed to fix this algorithm.

So please don't open a new bug, it was part of this bug and has already been fixed, pushed and merged.

Comment 11 Daniel Paikov 2012-07-04 12:19:50 UTC
Checked on upstream.


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