Failing to sync loadBalancerpool after upgrading to VMware Cloud Director 10.6.0.1
search cancel

Failing to sync loadBalancerpool after upgrading to VMware Cloud Director 10.6.0.1

book

Article ID: 378742

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • After upgrading to VMware Cloud Director (VCD) 10.6.01, you started getting error related to syncing load balancer pool. Below the details of the error in the event details:

Internal Server Error - Could not execute JDBC batch update; SQL [/* Method: unknown */ /* insert com.vmware.vcloud.common.model.net.GatewayLoadBalancerHealthMonitorAssignmentModel */ insert into gateway_lb_hm_assignment (lb_health_monitor_id, lb_pool_id, id) values (?, ?, ?)]; constraint [uq_gat_lb_hm_ass_l_p_i_l_h_m_i]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
 - Batch entry 0 /* Method: unknown */ /* Method: unknown */ /* insert com.vmware.vcloud.common.model.net.GatewayLoadBalancerHealthMonitorAssignmentModel */ insert into gateway_lb_hm_assignment (lb_health_monitor_id, lb_pool_id, id) values ('########.####.####.########fad5'::uuid, '########.####.####.########b26f'::uuid, '########.####.####.########907e'::uuid) was aborted: ERROR: duplicate key value violates unique constraint "uq_gat_lb_hm_ass_l_p_i_l_h_m_i"
  Detail: Key (lb_pool_id, lb_health_monitor_id)=(########.####.####.########b26f, ########.####.####.########fad5) already exists.  Call getNextException to see other errors in the batch.

  • The error is related to the LoadBalancerPoolSyncJob that it is automatically run.

 

Environment

VMware Cloud Director 10.6
VMware Cloud Director 10.6.0.1

Cause

This error is seen when a provider scoped health monitor is assigned to pool in NSX Avi Load Balancer (NSX-ALB). The pool is already associated with a tenant scoped health monitor in VCD.
During the health monitor sync, VCD tried to create health monitor assignment for both health monitors because of which duplicate key error is seen.

Resolution

This is a known issue affecting VMware Cloud Director 10.6 and 10.6.0.1

 

WORKAROUND

Deleting existing assignments from VMware Cloud Director so that the next sync doesn’t fail.
To delete the existing assignments from VMware Cloud Director visit the documentation at Create and Assign a Custom Health Monitor in the VMware Cloud Director Service Provider Admin Portal
This will ensure that the functionality is not impacted because HMs are still associated with the pool in NSX-ALB.