This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 907153

Summary: attaching a cluster to DC fails if there's no storage.: ERROR: duplicate key value violates unique constraint "pk_vds_spm_id_map" Where: SQL statement "INSERT INTO vds_spm_id_map(storage_pool_id, vds_id, vds_spm_id) VALUES( $1 , $2 , $3 )"
Product: Red Hat Enterprise Virtualization Manager Reporter: Ohad Basan <obasan>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, amureini, dyasny, eedri, iheim, lpeer, mgoldboi, Rhev-m-bugs, yeylon, ykaul, yzaslavs
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-10 06:41:41 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:

Description Ohad Basan 2013-02-03 08:33:00 EST
Description of problem:
Engine is failing to attach cluster to DC in case a storage is absent.

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


How reproducible:
always

Steps to Reproduce:
prepare the following setup: a datacenter with A working cluster with a host in maintenance state. make sure that there is no storage domain available
2. click on Clusters tab.
3. click "edit".
4.  try to attach the cluster to the data center.


  
Actual results:
error is displayed: Error while executing action Edit Cluster properties: Internal Engine Error

and an exception is thrown:
013-02-03 03:18:58,216 ERROR [org.ovirt.engine.core.bll.AddVdsSpmIdCommand] (ajp-/127.0.0.1:8702-5) [57b8fd3] Command org.ovirt.engine.core.bll.AddVdsSpmIdCommand throw exception: org.springframework.dao.DuplicateKeyException: CallableStatementCallback; SQL [{call insertvds_spm_id_map(?, ?, ?)}]; ERROR: duplicate key value violates unique constraint "pk_vds_spm_id_map"
  Where: SQL statement "INSERT INTO vds_spm_id_map(storage_pool_id, vds_id, vds_spm_id) VALUES( $1 ,  $2 ,  $3 )"
PL/pgSQL function "insertvds_spm_id_map" line 2 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pk_vds_spm_id_map"
  Where: SQL statement "INSERT INTO vds_spm_id_map(storage_pool_id, vds_id, vds_spm_id) VALUES( $1 ,  $2 ,  $3 )"
PL/pgSQL function "insertvds_spm_id_map" line 2 at SQL statement


Expected results:


Additional info:
Comment 2 Yair Zaslavsky 2013-02-10 06:41:41 EST

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