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='/###.###.###.###', dhcpRanges=null, networkCidr='/###.###.###.###', dhcpConfig=null}], domainName='null', l2Extension=null, labels=null, overlayId=null, connectivityPath='/infra/tier-1s/########-####-####-####-############', transportZonePath='/infra/sites/default/enforcement-points/default/transport-zones/########-####-####-####-############', 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/########-####-####-####-############, 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='########-####-####-####-############', realizationId='########-####-####-####-############', 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/2########-####-####-####-############
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/########-####-####-####-############ : RealizedL2ResourcesOfMetadataProxy: realized RZ of LogicalSwitch=GenericPolicyRealizedResource{path=/infra/realized-state/enforcement-points/default/logical-switches/infra-########-####-####-####-############-ls, realizationObjectId=########-####-####-####-############, realizationState=REALIZED, intentVersion=2, realizedVersionOnEnforcement=4663, realizationAPI=/api/v1/logical-switches/########-####-####-####-############, 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/########-####-####-####-############], values=[/infra/tier-1s/########-####-####-####-############]}, l2vpn_paths=AttributeVal{dataType=TYPE_STRING, multiValue=[], values=[]}}, intentPaths=[/infra/segments/########-####-####-####-############]}. 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/########-####-####-####-############. 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) ~[?:?]

Environment

VMware NSX

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. Run the below API or curl to get the segment details:

GET https://###.###.###.###/policy/api/v1/infra/segments/<segment-id>

OR

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

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

PUT https:///###.###.###.###/policy/api/v1/infra/segments/<segment-id> 

**include the body from the GET API call in step 1

OR

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

*To create the file with the body from the above curl output:
touch /tmp/segment.json

*Grab the body from the GET curl command and save it to the segment.json file
-vim /tmp/segment.jsoncopy 
-i for Insert
-copy and paste output
Esc(key):wq!