Bug 893097

Summary: Adding host with already exist name results in exception in the engine
Product: Red Hat Enterprise Virtualization Manager Reporter: Arik <ahadas>
Component: ovirt-engineAssignee: Arik <ahadas>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: dyasny, gchaplik, hateya, iheim, lpeer, michal.skrivanek, mlipchuk, Rhev-m-bugs, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-08 16:05:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Arik 2013-01-08 15:17:12 UTC
Description of problem:
Internal engine error when adding new host with already exist name

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. create host named "aa"
2. create another host named "aa"
3.
  
Actual results:
UI - dialog with "Error while executing action New Host: Internal Engine Error" is shown
backend - sql exception:
2013-01-08 17:09:09,040 ERROR [org.ovirt.engine.core.bll.AddVdsCommand] (http--0.0.0.0-8700-5) [6159c275] Command org.ovirt.engine.core.bll.AddVdsCommand throw exception: org.springframework.dao.DuplicateKeyException: CallableStatementCallback; SQL [{call insertvdsstatic(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: duplicate key value violates unique constraint "vds_static_vds_name_unique"

Expected results:
no exception in the backend, better error in the UI

Additional info:
we found that in v3.0 we couldn't get into this scenario because the UI prevented the user from specifying an already exist name for new VM. the solution here should be in the backend also because of rest api.

Comment 1 Haim 2013-01-08 16:05:30 UTC

*** This bug has been marked as a duplicate of bug 893089 ***