Bug 884780 - incomplete error message during export template with multiple disks when one of the SDs in maintenance state
Summary: incomplete error message during export template with multiple disks when one ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.1.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: 3.2.0
Assignee: Alissa
QA Contact: Leonid Natapov
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-06 17:34 UTC by vvyazmin@redhat.com
Modified: 2016-02-10 19:43 UTC (History)
11 users (show)

Fixed In Version: SF7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:


Attachments (Terms of Use)
## Logs rhevm (5.04 MB, application/octet-stream)
2012-12-06 17:34 UTC, vvyazmin@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 11716 0 None None None Never

Description vvyazmin@redhat.com 2012-12-06 17:34:38 UTC
Created attachment 658903 [details]
## Logs rhevm

Description of problem:
Get incomplete error message, during export template with multiple disk, when one of SD in maintenance state.

Version-Release number of selected component (if applicable):
	RHEVM 3.1 environment:
RHEVM: rhevm-3.1.0-32.el6ev.noarch
VDSM: vdsm-4.9.6-44.0.el6_3.x86_64 
LIBVIRT: libvirt-0.9.10-21.el6_3.6.x86_64 
QUMU-KVM: qemu-kvm-rhev-0.12.1.2-2.295.el6_3.5.x86_64 
SANLOCK: sanlock-2.3-4.el6_3.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create a template with multiple disk on multiple SD.
2. Put one domain in maintenance
3. Export template to Export Domain
  
Actual results:
Get an error:
Error while executing action: Cannot export VM. Provided destination storage domains doesn't match for provided disks.

Expected results:
IMHO should be: 
Error while executing action: Cannot export Template. The relevant Storage Domain is inaccessible.
-Please handle Storage Domain issues and retry the operation.


Additional info:

/var/log/ovirt-engine/engine.log

2012-12-06 16:10:05,285 ERROR [org.ovirt.engine.core.bll.ExportVmTemplateCommand] (http-/0.0.0.0:8443-14) Can not found any default active domain for one of the disks of template with id : 8fd9ef22-386c-4957-8df9-a5967d7961a4
2012-12-06 16:10:05,285 WARN  [org.ovirt.engine.core.bll.ExportVmTemplateCommand] (http-/0.0.0.0:8443-14) CanDoAction of action ExportVmTemplate failed. Reasons:VAR__ACTION__EXPORT,VAR__TYPE__VM,ACTION_TYPE_FAILED_MISSED_STORAGES_FOR_SOME_DISKS

Comment 1 Alissa 2012-12-11 16:18:37 UTC
Suggested new message:
Error while executing action: Cannot export Template. The following storage domains: storageDomain1,storageDomain2,... are inaccessible.

Comment 2 Allon Mureinik 2012-12-12 16:52:22 UTC
Alissa, consider the following message:
Error while executing action: Cannot export Template. The following storage domains: storageDomain1,storageDomain2,... are in maintenance/non-operational status.

This bug should be solved in two levels:
1. Fix the error message
2. Grey out the relevant template in the UI so the operation isn't even possible.

I think cloning the bug would be in order for the two different issues.

Comment 3 Daniel Erez 2012-12-12 18:14:48 UTC
(In reply to comment #2)
> Alissa, consider the following message:
> Error while executing action: Cannot export Template. The following storage
> domains: storageDomain1,storageDomain2,... are in
> maintenance/non-operational status.
> 
> This bug should be solved in two levels:
> 1. Fix the error message
> 2. Grey out the relevant template in the UI so the operation isn't even
> possible.

Graying out the relevant template in the UI is currently not applicable.
VmTemplate business entity does not contain the status of each disk storage
domain - thus, the relevant information is not available through search.

> 
> I think cloning the bug would be in order for the two different issues.

Comment 4 Alissa 2013-01-31 16:07:31 UTC
Accurate reproduction scenario:

1. Configure VM with more than one disk. Each disk should be on a different storage domain. (2 disks with 2 storage domains are enough)
2. VM - right click - make template
3. In template dialog, notice the "target" storage domain - make sure there are at least 2 different
4. After template created, put one of the storage domains in maintenance
5. In templates tab, select the newly created template, press "export"
The message "Error while executing action: Cannot export VM. Provided destination storage domains doesn't match for provided disks" with appear in UI.

Comment 5 Alissa 2013-02-04 22:12:39 UTC
In order to properly (and user friendly) solve the bug, there is a need to insert a dynamic part presenting the list of domain names to the text message  ("The following storage domains: ${domainNames} are in maintenance/non-operational status.
").

Extracting the domain names requires some not trivial digging in the code to get this info, and unfortunately it should be done in 3 different places because this text message (ACTION_TYPE_FAILED_MISSED_STORAGES_FOR_SOME_DISKS) is used by 3 commands.
I suggest to postpone the full solution of the bug to be after 3.2 - it's too many code changes right now.

As temporary improvement of the current situation, a patch was submitted that does 2 things:
1. Fixes "Cannot export VM" to "Cannot export Template".
2. Rewrites second part of the message "Provided destination storage domains doesn't match for provided disks." to a more clear and related to scenario text.

http://gerrit.ovirt.org/#/c/11716/

Comment 6 Allon Mureinik 2013-02-06 08:09:44 UTC
The proposed fix is fine, let's roll with it.
Retrieving the SD info just isn't worth the effort.

Comment 7 Leonid Natapov 2013-03-06 09:55:01 UTC
sf9. fixed.

Comment 8 Itamar Heim 2013-06-11 09:35:51 UTC
3.2 has been released

Comment 9 Itamar Heim 2013-06-11 09:35:52 UTC
3.2 has been released

Comment 10 Itamar Heim 2013-06-11 09:51:03 UTC
3.2 has been released


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