Bug 1395583

Summary: When trying to edit network that is used by multiple VMs or templates error message macros are not filled
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: BLL.NetworkAssignee: Leon Goldberg <lgoldber>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: low Docs Contact:
Priority: medium    
Version: 4.0.5.5CC: bugs, danken, ylavi
Target Milestone: ovirt-4.1.1Keywords: Regression
Target Release: ---Flags: rule-engine: ovirt-4.1+
ylavi: blocker-
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.1.1.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-21 09:34:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
engine log
none
screenshots none

Description Michael Burman 2016-11-16 09:28:18 UTC
Created attachment 1221081 [details]
engine log

Description of problem:
(${ACTION_TYPE_FAILED_NETWORK_IN_ONE_USE_LIST_COUNTER}): ${ACTION_TYPE_FAILED_NETWORK_IN_ONE_USE_LIST} when trying to edit network that is used by multiple VMs or templates. 

When we trying to edit a network(change name, change to non-VM) while those networks are used by a VMs or templates(attached to the vNICs) we got the next errors:

Error while executing action: Cannot edit Network. This logical network is used by templates: (${ACTION_TYPE_FAILED_NETWORK_IN_ONE_USE_LIST_COUNTER}): ${ACTION_TYPE_FAILED_NETWORK_IN_ONE_USE_LIST}
- Please detach templates using this logical network and try again.


Error while executing action: Cannot edit Network. This logical network is used by virtual machines: (${ACTION_TYPE_FAILED_NETWORK_IN_ONE_USE_LIST_COUNTER}): ${ACTION_TYPE_FAILED_NETWORK_IN_ONE_USE_LIST}
- Please detach virtual machines using this logical network and try again

engine.log- 

2016-11-16 11:18:02,294 WARN  [org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand] (default task-10) [4f20085d] Validation of action 'UpdateNetwork' failed for user admin@internal-authz. Reasons: VAR__TYPE__NETWORK,VAR__ACTION__UPDATE,ACTION_TYPE_FAILED_NETWORK_IN_MANY_USES,$ACTION_TYPE_FAILED_NETWORK_IN_MANY_USES_LIST         rhel6.7_template,
        test_template_bug,$ACTION_TYPE_FAILED_NETWORK_IN_MANY_USES_LIST_COUNTER 2,VAR__ENTITIES__VM_TEMPLATES
2016-11-16 11:21:05,338 WARN  [org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand] (default task-14) [7f20c3e1] Validation of action 'UpdateNetwork' failed for user admin@internal-authz. Reasons: VAR__TYPE__NETWORK,VAR__ACTION__UPDATE,ACTION_TYPE_FAILED_NETWORK_IN_MANY_USES,$ACTION_TYPE_FAILED_NETWORK_IN_MANY_USES_LIST         vm2_sr-iov,
        vm3_sr-iov,$ACTION_TYPE_FAILED_NETWORK_IN_MANY_USES_LIST_COUNTER 2,VAR__ENTITIES__VMS

- This a regression from 3.6.z 

Error while executing action: Cannot edit Network. This logical network is used by virtual machines: (6): Neutron_new2,
Neutron_VM3,
ManageIQ_VM,
v4,
v1,


Error while executing action: Cannot edit Network. This logical network is used by templates: (2): testt,
sr-temp
- Please detach templates using this logical network and try again.

Version-Release number of selected component (if applicable):
 4.0.5.5-0.1.el7ev

How reproducible:
100%

Steps to Reproduce:
1. Create network and add it to 2 VMs or templates
2. Edit the network, try to change the name or try to change to non-vm network

Actual results:
The VMs names or templates is - (${ACTION_TYPE_FAILED_NETWORK_IN_ONE_USE_LIST_COUNTER}): ${ACTION_TYPE_FAILED_NETWORK_IN_ONE_USE_LIST}

Expected results:
Should replaced with actual names

Comment 1 Michael Burman 2016-11-16 09:30:23 UTC
Created attachment 1221082 [details]
screenshots

Comment 2 Red Hat Bugzilla Rules Engine 2016-11-23 09:22:43 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 3 Michael Burman 2017-02-19 10:26:51 UTC
Same on  4.1.1.2-0.1.el7

Error while executing action: Cannot edit Network. This logical network is used by virtual machines: (${ACTION_TYPE_FAILED_NETWORK_IN_ONE_USE_LIST_COUNTER}): ${ACTION_TYPE_FAILED_NETWORK_IN_ONE_USE_LIST}
- Please detach virtual machines using this logical network and try again.

Error while executing action: Cannot edit Network. This logical network is used by templates: (${ACTION_TYPE_FAILED_NETWORK_IN_ONE_USE_LIST_COUNTER}): ${ACTION_TYPE_FAILED_NETWORK_IN_ONE_USE_LIST}
- Please detach templates using this logical network and try again.

Comment 4 Leon Goldberg 2017-02-20 14:24:31 UTC
This wasn't supposed to be set to ON_QA yet; the fix isn't included in 4.1.1.2 (will probably appear in 4.1.1.3).

Comment 5 Michael Burman 2017-03-06 07:57:33 UTC
Verified on - 4.1.1.3-0.1.el7