Concurrent update of a Rights Bundle using the Cloud Director API fails
search cancel

Concurrent update of a Rights Bundle using the Cloud Director API fails

book

Article ID: 325519

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • Performing concurrent Cloud Director API calls to publish a Rights Bundle:
POST /cloudapi/1.0.0/rightsBundles/[urn]/tenants/publish
  • The backend operation is successful but a number of the concurrent Cloud Director API calls will fail with an error of the form:
org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [\/* insert collection row com.vmware.vcloud.common.model.rights.RightsBundle.tenants *\/ insert into rights_bundle_tenant (rights_bundle_id, org_id) values (?, ?)]; constraint [pk_righ_bund_ten_ri_bu_id_or_i]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
    at com.vmware.vcloud.common.db.HibernateUtils.translate(HibernateUtils.java:75)
    at com.vmware.vcloud.common.db.Hibernate3TransactionManager.doCommit(Hibernate3TransactionManager.java:235)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:746)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:714)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:535)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:305)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
    at com.vmware.ssdc.backend.dao.rbac.impl.RightsMappingPublishingDaoImpl$$EnhancerBySpringCGLIB$$ea5520db.publishMappingToTenants(<generated>)
...


Environment

VMware Cloud Director 10.x

Cause

Currently this API endpoint does not support concurrent operations.

Resolution

This is a known issue affecting VMware Cloud Director 10.3 and 10.4 releases.

Workaround:
To workaround this issue, serialize access to the API endpoint so that calls are not made concurrently.

Additional Information

VMware Cloud Director Product Documentation, Managing Rights Bundles
VMware Cloud Director OpenAPI, Rights Bundles