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 )"
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:
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: