VMware NSX-T Segment realization keeps failing with "ObjectAlreadyExistsException" error
search cancel

VMware NSX-T Segment realization keeps failing with "ObjectAlreadyExistsException" error

book

Article ID: 322472

calendar_today

Updated On:

Products

VMware NSX Networking

Issue/Introduction

Symptoms:
  • You are using VMware NSX-T 3.2.1 Federation or earlier.
  • In the UI the NSX Segment status is showing as "Failed" with a error: "Realization Errors : <segment_name>".
  • The impacted Segment becomes unusable.
  • Checking the NSX manager log file in /var/log/proton/nsxapi.log you see the below error: ObjectAlreadyExistsException: null 
INFO RealizationFetchUtility-5 RealizationFetchUtility 4306 POLICY [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] Realization for /global-infra/realized-state/enforcement-points/default/logical-switches/infra-<uuid>-ls was found, but invalid. Iteration: 8
ERROR providerTaskExecutor-21 PolicyProviderUtil 4306 POLICY [nsx@6876 comp="nsx-manager" errorCode="PM500015" level="ERROR" subcomp="manager"] Unexpected exception received during provider invocation.
com.vmware.nsx.management.common.exceptions.ObjectAlreadyExistsException: null
  • Previous to this in the logs we can see this segment reporting as UNINITIALIZED:
INFO UfoDelayedIndexer-0 ConsolidatedRealizedStateServiceImpl 4322 POLICY [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] Updated consolidated state for intentPath:/global-infra/segments/<uuid> to:UNINITIALIZED
INFO UfoDelayedIndexer-0 ConsolidatedRealizedStateServiceImpl 4322 POLICY [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] Intent version and GPRR intent version dont match: setting publish status to unrealized

 
NOTE: The preceding log excerpts are only examples. Date, time and environmental variables may vary depending on your environment.


Environment

VMware NSX-T Data Center

Cause

This is a know issue where the GPRR realizationObjectId=null or the segment lsId='null.
  • Checking on the NSX manager in var/log/proton/nsxapi.log you can see the segment being created by following the segment UUID. The UUID of the segment can be obtained by running admin CLI command get logical-switch on an NSX manager or from the error message in the UI.
INFO providerTaskExecutor-71 SegmentProviderNsxT 4306 SWITCHING [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] Realized segment /global-infra/realized-state/enforcement-points/default/logical-switches/infra-<uuid>-ls does not exist. Creating it.
  • Following this thread you can see the lsId='null' for the segment:
INFO providerTaskExecutor-71 SegmentProviderNsxT 4306 SWITCHING [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] Processing realization of segment Segment{type=ROUTED, lsId='null',
...
policyPath=/global-infra/segments/<uuid>, markedForDelete=false]
  •  This results in the GenericPolicyRealizedResource (GPRR) illustrating realizationObectId=null and realizationStatue=UNREALIZED :
INFO providerTaskExecutor-71 SegmentProviderNsxT 4306 SWITCHING [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] Retrieving LS for segment <uuid>. The realized logical switch info is GenericPolicyRealizedResource{path=/global-infra/realized-state/enforcement-points/default/logical-switches/infra-<uuid>-ls, realizationObjectId=null, realizationState=UNREALIZED,
...
  • Instead of creating a new logical switch corresponding to the segment as part of realization, the existing logical switch should be updated and the GPRR's state should become REALIZED. However, as the value of GPRR's realizationObjectId is null, it will attempt to create a new logical switch which fails with "ObjectAlreadyExistsException".

Resolution

This is resolved in VMware NSX-T 3.2.2 VMware Downloads.

Workaround:
If you believe you have encountered this issue, please open a support request with VMware NSX-T GSS and refer to this KB article.