Created attachment 1109819 [details] screenshots Description of problem: [Text] - Improve the format of the error message for detaching networks that are in use by VMs from SetupNetwork. Currently when detaching 1 network from 1 VM while this network is used by the VM, the error message looks OK , for example --> "Cannot setup Networks. The following Logical Network: 'net-1' is being used by the following VM: 'v1'. Please stop the VM and try again." But, if we have more then 1 network and 1 VM involved, the error message looks pretty bad and the order of the sentence is inconsistent (singular vs plural), for example : "Cannot setup Networks. The following VMs are actively using the Logical Networks 'net-1, qosvlan2' : 'v2, v3, v4'. Please stop the VMs and try again." - We have 2 issues here: 1) Singular, the sentence starts with: 'The following Logical Network' Plural, the sentence starts with: 'The following VMs' and it becomes very messy to understand. It should be consistent for all scenarios. 'The following Logical Network/s is being/are being used by the following VM/VMs' 2) In case of multiple Networks and VMs, the error message looks not aligned. each network get it's own line in the error, the same for the VMs. This should be fixed and improved. Version-Release number of selected component (if applicable): 3.6.2-0.1.el6 How reproducible: 100 Steps to Reproduce: 1. Detach 1 network from 1 VM while it being used by the VM 2. Detach 2 networks from 1 VM while it being used by the VM 3. Detach 2 networks from 2 VMs while it being used by the VMs Actual results: 1 - Error message is OK 2 - Sentence starts with "The following VMs" instead of "The following Logical Network/s" Each network name gets it's own line in the error. 3 - Sentence starts with "The following VMs" instead of "The following Logical Network/s" Each network and VM name gets it's own line in the error. The more networks and VMs you will have, the more lines will appear in the error message. The same will be shown in the engine.log. 2015-12-27 15:28:47,062 WARN [org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand] (ajp-/127.0.0.1:8702-9) [b3166bf] CanDoAction of action 'HostSetupNetworks' failed for user admin@internal. Reasons: VAR__ACTION__SETUP,VAR__TYPE__NETWORKS,MULTIPLE_NETWORKS_CANNOT_DETACH_NETWORKS_USED_BY_VMS,$networkNames net-1, qosvlan2,$networkNames_COUNTER 2,$vmNames v2, v3, v4,$vmNames_COUNTER 3 Expected results: All of this should be improved and fixed. There should be consistency between single network/VM and multiple networks/VMs.
Is this format acceptable: (?) Cannot setup Networks. The following Logical Network(s): ' vmnet0' are being used by the following VM(s): ' VM0' . Please stop the VM(s) and try again. Cannot setup Networks. The following Logical Network(s): ' vmnet0, vmnet1' are being used by the following VM(s): ' VM0' . Please stop the VM(s) and try again. Cannot setup Networks. The following Logical Network(s): ' vmnet0, vmnet1' are being used by the following VM(s): ' VM0, VM1' . Please stop the VM(s) and try again.
Yes, indeed)
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.
oVirt 4.0 beta has been released, moving to RC milestone.
It has been fixed and merged long ago.
Verified on - 4.1.0-0.2.master.20161214234138.gitc23fdcc.el7.centos "Cannot setup Networks. The following Logical Network: ' n1' is being used by the following VM(s): ' ro2, ro1, ro3' . Please stop the VM(s) and try again."