Segment fails to delete from Global Manager. Status is "Delete in Progress"
search cancel

Segment fails to delete from Global Manager. Status is "Delete in Progress"

book

Article ID: 319116

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

In NSX-T Federation, the Global Manager can be used to create and delete segments and changes are propagated to Local Managers.
Segments in UI show Status: "Delete in Progress" when mousing over Segment name.

Environment

VMware NSX-T Data Center
VMware NSX-T Data Center 3.x

Cause

A segment deletion attempt from the Global Manager can become stuck in progress if a Local Manager fails to delete its Logical Switch for the corresponding Segment.
 
/var/log/syslog on Local Manager shows entries similar to:
subcomp="manager" username="nsx_policy"] Request to delete LogicalSwitch : LogicalSwitch/<LS_UUID>
2021-05-25T01:01:01.111Z nsxmgr NSX 6717 POLICY [nsx@6876 comp="nsx-manager" level="WARNING" reqId="" subcomp="policy" username="admin"] Entity /global-infra/segments/<LS_UUID> does not exist

Resolution

1. Confirm in LM UI that there are no ports in use with the Logical Switch which was not deleted
 
2. To remove the Logical Switch, SSH to a Local Manager node
 
3. Run get logical-switches on the Local Manager CLI and confirm the stale Logical Switch is listed, and note its UUID
 
4. Elevate to root shell with st en
 
5. Confirm the Logical Switch info can be polled with API:
curl -k -v -H "Content-Type:application/json" -u admin -X GET "https://{mgr_IP}/api/v1/logical-switches/(LS_UUID)"
 
6. Remove stale Logical Switch objects via API:
curl -k -v -H "Content-Type:application/json"  -H "X-Allow-Overwrite:true" -u admin -X DELETE "https://{mgr_IP}/api/v1/logical-switches/{LS_UUID}?cascade=true&detach=true"
 
This will return '200' response code if deletion is successful
 
7. Once Logical Switch is removed from Local Manager in question, confirm Segment is automatically deleted in Local Manager and Global Manager UI
 

8. Perform a sync between the GM and each local manager, using the following API:
POST https://localhost/policy/api/v1/infra/full-sync-action?action=request_notifications_full_sync