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
Suggested new message: Error while executing action: Cannot export Template. The following storage domains: storageDomain1,storageDomain2,... are inaccessible.
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.
(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.
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.
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/
The proposed fix is fine, let's roll with it. Retrieving the SD info just isn't worth the effort.
sf9. fixed.
3.2 has been released