Deleting a segment in NSX-T fails with stuck in "In Progress"
search cancel

Deleting a segment in NSX-T fails with stuck in "In Progress"

book

Article ID: 401089

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • You are unable to delete a segment. It is stuck in an "In Progress" state.
  • You may see this error in the UI due to a logical port that is still associated with the segment, preventing its deletion.

Unable to delete logical port with attachments of LogicalPort InternalLogicalPort/########-####-####-######## in the UI.

  • You may see the following log message in the NSX Manager file /var/log/syslog.log 

2025-06-05T07:15:00.187Z NSXmanager.com NSX 1066039 POLICY [nsx@6876 comp="nsx-manager" errorCode="PM0" level="ERROR" subcomp="manager"] Created alarm Alarm [policyPath=/infra/realized-state/enforcement-points/default/logical-switches/<Segment-name>/alarms/########-####-####-########, message=Unable to delete logical port with attachments of LogicalPort InternalLogicalPort/########-####-####-########.,errorId=PROVIDER_INVOCATION_FAILURE, path=null, apiError=error_code=8402, module_name=NsxSwitching service, error_message='Unable to delete logical port with attachments of LogicalPort InternalLogicalPort/########-####-####-########.', sourceSiteId=null].

Environment

VMware NSX

Cause

NSX is unable to delete the segment as it has a stale logical port attached. This is a known issue in older releases. 

Resolution

This issue is resolved in VMware NSX 4.2.2 available at Broadcom downloads.

If you are having difficulty finding and downloading software, please review the Download Broadcom products and software KB.

 

Workaround:

Force delete stale logical port using below API:

curl -k -X -H "Content-Type: application/json" -H "X-Allow-Overwrite: true" DELETE https://<NSX-Manager-FQDN-or-IP>/api/v1/logical-ports/<logical-portid>?detach=true

Delete the segment which is stuck using below API:

DELETE https://{mgrIP}/policy/api/v1/infra/segments/<segment-id>

 

Note: You can use below API to get the segment Id which is stuck in-progress state:

GET https://{mgrIP}/policy/api/v1/infra/segments?include_mark_for_delete_objects=true