Realization error for nsx-t segments
search cancel

Realization error for nsx-t segments

book

Article ID: 369837

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

 

  • Realization error encountered for NSX-T segments
  • Error occurred post-upgrade from NSX-T 3.1.2 to 3.2.3.1
  • All segments are currently in a failed status

nsxapi.log

2024-02-21T02:00:00.640Z  INFO providerTaskExecutor-102 MetadataProxySegmentAttachmentHandler 4360 POLICY [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] MetadataProxySegmentAttachmentHandler.onHandleSegmentRealization with segment=Segment{type=ROUTED, lsId='null', subnets=[SegmentSubnet{gatewayAddress='X.X.X.X/X', dhcpRanges=null, networkCidr='X.X.X.X/X/X', dhcpConfig=null}], domainName='null', l2Extension=null, labels=null, overlayId=null, connectivityPath='/infra/tier-1s/b4XX91eb-XXXX-41f6-b105-XXXXce3aXXc6', transportZonePath='/infra/sites/default/enforcement-points/default/transport-zones/4e3b816e-047d-464a-aeac-b792b82f2b6b', vlanIds=null, advancedConfig=SegmentAdvancedConfig{addressPoolPaths=null, hybrid=false, interRouter=false, localEgress=false, uplinkTeamingPolicyName=null, localEgressRoutingPolicies=null, urpfMode=STRICT, ndraProfilePath=null, originId=null, originType=null, nodeLocalSwitch=null, multicast=true} ConnectivityAdvancedConfig{connectivity='ON'}, l2VpnPathPreviousStateList=[], connectivityPathPreviousState=, segmentTypePathPreviousState=, forceDelete=false, federationConfig=null, metadataProxyPaths=null, dhcpConfigPath=null, bridgeProfiles=null, addressBindingEntryList=null, adminState=null, macPoolId=null, replicationMode=MTEP, evpnStatus=false, evpnTenantConfigPath=null, vniPoolPath=null, extraConfigs=null} [policyPath=/infra/segments/2XX1638-XXXX-4e01-XXXX-7de0b3XXb3ca, markedForDelete=false], enforcementPoint=EnforcementPointDto{version='null', connectionInfo='NSXTConnectionInfoDto{username='null', thumbprint='null', transportZoneIds='[]', edgeClusterIds='[]', super{EnforcementPointConnectionInfoDto{enforcementPointAddress='127.0.0.1:7440/nsxapi', resourceType='NSXTConnectionInfo'}}}', autoEnforce='true', super{PolicyConfigResourceDto{children='null', markedForDelete='false', overridden='false', super{PolicyResourceDto{path='/infra/sites/default/enforcement-points/default', relativePath='default', parentPath='/infra/sites/default', uniqueId='e8xxx3d2-XXXX-4b0xxx28b-e3xxxa302e5c', realizationId='e8xxx3d2-XXXX-4b0xxx28b-e3xxxa302e5c', super{ManagedResource{resourceType='EnforcementPoint', aCreateUser='system', aCreateTime='1693293944789', aLastModifiedUser='system', aLastModifiedTime='1693293944808', aSystemOwned='false', aProtection='null', id='default', displayName='default', description='null', tags='null', super{RevisionedResource{aRevision='0', super{Resource{aSelf='null', aLinks='null', aSchema='null'}}}}}}}}}}}
2024-02-21T02:00:00.640Z  INFO providerTaskExecutor-102 MetadataProxySegmentAttachmentHandler 4360 POLICY [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] No metadata-proxy is attached to the segment now. To find and de-attach previous metadata-proxy from logical-switch of segment null.
2024-02-21T02:00:00.640Z  INFO providerTaskExecutor-102 MetaDataProxyProviderHelper 4360 POLICY [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] Finding realized resources of NSX L2 entities of attached metadata-proxy to segment /infra/segments/2XX1638-XXXX-4e01-XXXX-7de0b3XXb3ca
2024-02-21T02:00:00.641Z  INFO providerTaskExecutor-102 MetaDataProxyProviderHelper 4360 POLICY [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] Loaded realized-resources of NSX L2 for metadata-proxy semgent /infra/segments/2XX1638-XXXX-4e01-XXXX-7de0b3XXb3ca : RealizedL2ResourcesOfMetadataProxy: realized RZ of LogicalSwitch=GenericPolicyRealizedResource{path=/infra/realized-state/enforcement-points/default/logical-switches/infra-2XX1638-XXXX-4e01-XXXX-7de0b3XXb3ca-ls, realizationObjectId=e8xxx3d2-XXXX-4b0xxx28b-e3xxxa302e5c, realizationState=REALIZED, intentVersion=2, realizedVersionOnEnforcement=4663, realizationAPI=/api/v1/logical-switches/e8xxx3d2-XXXX-4b0xxx28b-e3xxxa302e5c, entityType=RealizedLogicalSwitch, readBeforeWriteRequired=false, extendedAttributes={overlay_id=AttributeVal{dataType=TYPE_STRING, multiValue=[69719], values=[69719]}, connectivity_path=AttributeVal{dataType=TYPE_STRING, multiValue=[/infra/tier-1s/b4d891eb-XXXX-41f6-b105-XXXXce3a59c6], values=[/infra/tier-1s/b4d891eb-XXXX-41f6-b105-XXXXce3a59c6]}, l2vpn_paths=AttributeVal{dataType=TYPE_STRING, multiValue=[], values=[]}}, intentPaths=[/infra/segments/2XX1638-XXXX-4e01-XXXX-7de0b3XXb3ca]}. realized RZ of LogicalPort=.null
2024-02-21T02:00:00.641Z  INFO providerTaskExecutor-102 MetadataProxySegmentAttachmentHandler 4360 POLICY [nsx@6876 comp="nsx-manager" level="INFO" subcomp="manager"] No metadata-proxy was previously attached to the segment /infra/segments/2XX1638-XXXX-4e01-XXXX-7de0b3XXb3ca. ignore the event.
2024-02-21T02:00:00.641Z ERROR providerTaskExecutor-102 PolicyProviderUtil 4360 POLICY [nsx@6876 comp="nsx-manager" errorCode="PM500015" level="ERROR" subcomp="manager"] Unexpected exception received during provider invocation.
java.lang.NullPointerException: null
        at com.vmware.nsx.management.policy.statistics.connectivity.service.SegmentRuntimeServiceImpl.updateRealizedEntities(SegmentRuntimeServiceImpl.java:242) ~[?:?]
        at com.vmware.nsx.management.policy.providers.switching.SegmentProviderNsxT.handleSegmentChange(SegmentProviderNsxT.java:265) ~[?:?]

Cause

Admin State is null preUpgrade causing this issue post upgrade in Segment realization.

Resolution

Engineering is aware of the issue and its resolution in versions 3.2.4 and 4.1.1.

Workaround:

Perform a GET and PUT on the segment with the same payload.

1. List the Segments with API:

   `curl -k -H "Content-Type:application/json" -u admin -X GET https://<nsxmgrip>/policy/api/v1/infra/segments/`

   Make a note of the impacted segment ID.

2. Run the below API to get the segment details:

   `curl -k -H "Content-Type:application/json" -u admin -X GET https://<nsxmgrip>/policy/api/v1/infra/segments/<segment-id>`

3. Copy the above segment payload and run PUT against the same segment:

   `curl -k -H "Content-Type:application/json" -u admin -X PUT https://localhost/policy/api/v1/infra/segments/<segment-id> -d @segment.json`

   Note: We may use Postman to run this API.