Bug 1324323 - Internal Engine Error when removing an unmanaged network from host NIC
Summary: Internal Engine Error when removing an unmanaged network from host NIC
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network
Version: 4.0.0
Hardware: x86_64
OS: Linux
medium
medium vote
Target Milestone: ovirt-4.0.0-rc
: ---
Assignee: Alona Kaplan
QA Contact: Meni Yakove
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-06 05:58 UTC by Michael Burman
Modified: 2016-06-06 12:53 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-06 12:53:23 UTC
oVirt Team: Network
danken: ovirt-4.0.0?
rule-engine: blocker?
mburman: planning_ack?
danken: devel_ack+
mburman: testing_ack?


Attachments (Terms of Use)
engine log (60.71 KB, application/x-gzip)
2016-04-06 05:58 UTC, Michael Burman
no flags Details
error when removing unmanged network (106.24 KB, image/png)
2016-04-06 05:59 UTC, Michael Burman
no flags Details
changes took place (66.19 KB, image/png)
2016-04-06 06:00 UTC, Michael Burman
no flags Details

Description Michael Burman 2016-04-06 05:58:22 UTC
Created attachment 1144094 [details]
engine log

Description of problem:
Internal Engine Error when removing an unmanaged network from host NIC in the next scenario:

1) Label NIC with 'lb1' 
2) Network 'n1' attached to this NIC without label
3) Remove network from DC
4) Network 'n1' became 'unamnaged' network
5) No network can be attached to this NIC until removing 'n1' unmanaged network - BZ  1167698
6) Create new vlan network 'n2' with label 'lb1'
7) Create new vlan network 'n3' with label 'lb1' 
8) Create new vlan network 'n4' with label 'lb1' 
9) This networks should be attached to the NIC, but can't because of the unmanaged network, that we should first need to remove. BZ  1167698
10) Remove unmanaged network 'n1' from host via setup networks

Result: 
Internal engine error --> 

Exception thrown in the engine log:

 2016-04-06 08:26:09,161 ERROR [org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand] (default task-3) [23ce087e] Command 'org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand' failed: Callabl
eStatementCallback; SQL [{call insertnetworkattachment(?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: duplicate key value violates unique constraint "network_attachments_network_id_nic_id_key"
  Detail: Key (network_id, nic_id)=(b108800f-a8c2-488b-90ca-0325065ac305, c01e8c79-cc4d-4ebd-b78e-2e062fdd7727) already exists.
  Where: SQL statement "INSERT INTO network_attachments (

On host, the changes took place. The unmanaged network 'n1' was removed from the host, and all other networks that should have been attached to the NIC via the label now attached as they should. 


Version-Release number of selected component (if applicable):
4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch

How reproducible:
100 

Steps to Reproduce:
See description above ^^ 

Actual results:
Internal engine error

Expected results:
Removing of the unamanged should succeed without any engine errors and exceptions. All the other networks that should have been attached to the host NIC via the label attached to the NIC after removing the unmanaged network from the host. 

Additional info:
Discovered during the testing of BZ - 1167698

Comment 1 Michael Burman 2016-04-06 05:59:00 UTC
Created attachment 1144095 [details]
error when removing unmanged network

Comment 2 Michael Burman 2016-04-06 06:00:33 UTC
Created attachment 1144096 [details]
changes took place

Comment 3 Red Hat Bugzilla Rules Engine 2016-04-14 07:44:04 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 4 Sandro Bonazzola 2016-05-02 09:47:22 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 5 Yaniv Lavi 2016-05-23 13:12:30 UTC
oVirt 4.0 beta has been released, moving to RC milestone.


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