NSX Segment Fails to Delete stuck in "In Progress" status
search cancel

NSX Segment Fails to Delete stuck in "In Progress" status

book

Article ID: 431014

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

When attempting to delete a segment in VMware NSX, the segment is not removed as expected. Instead, it remains visible in the UI, greyed out, with a status of "In Progress" and this alarm:

The object path=global-infra/segments/uuid cannot be deleted as it is being referenced by other objects path /infra/domains/default/groups/group_name

Environment

NSX 4.x

Resolution

Remove the Segment from the Group

Option 1: 

  1. Navigate to Inventory > Groups.
  2. Search for the group name identified in the alarm (e.g., Web-Servers-Group).
  3. Click the three dots (⋮) and select Edit.
  4. Navigate to the Members tab.
  5. Locate the segment stuck in "In Progress" (e.g., Web-Segment-01) and uncheck the segment from the group.
  6. Click Save to update the group.

Option 2: 

Note: Before performing manual API modifications, it is highly recommended to take a fresh NSX Backup.


If the segment is greyed out in the group members list and cannot be removed via the UI, you must use a PATCH request to update the group's membership list manually. You must send the updated list of paths excluding the segment you wish to delete.

  1.  Retrieve Current Configuration: Before patching, use a GET call to capture the current group structure and all existing member paths.

    GET https://<NSX-Manager-IP>/policy/api/v1/infra/domains/default/groups/<group_name>

    Sample response:

    (Note the values in bold below, these are what you will use to construct your update.)

    {
      "expression" : [ {
        "paths" : [ "/infra/segments/Segment-01", "/infra/segments/Segment-02" ],
        "resource_type" : "PathExpression",
        "id" : "b7bb6f20-####-####-####-e49ee9702dfe",
        "path" : "/infra/domains/default/groups/Web-Servers-Group/path-expressions/b7bb6f20-####-####-####-e49ee9702dfe",
        "relative_path" : "b7bb6f20-####-####-####-e49ee9702dfe",
        "parent_path" : "/infra/domains/default/groups/<group_name>",
        "marked_for_delete" : false,
        "overridden" : false,
        "_protection" : "NOT_PROTECTED"
      } ],
      "extended_expression" : [ ],
      "reference" : false,
      "resource_type" : "Group",
      "id" : "<group_name>",
      "display_name" : "<group_name>",
      "path" : "/infra/domains/default/groups/<group_name>",
      "relative_path" : "<group_name>",
      "parent_path" : "/infra/domains/default",
      "unique_id" : "9011d0f8-####-####-####-99da545b7f32",
      "marked_for_delete" : false,
      "overridden" : false,
      "_system_owned" : false,
      "_create_time" : 1771971636621,
      "_last_modified_time" : 1771971636621,
      "_revision" : 0
    }
  2. Update the group members with a PATCH: After identifying the correct revision and member paths from the GET response, use the PATCH call to update the group and remove the stuck segment.

    PATCH https://<NSX-Manager-IP>/policy/api/v1/infra/domains/default/groups/<group_name>

    The following payload provides a new version of the group configuration that keeps the required member (Segment-01) while removing the stuck member (Segment-02) by omitting its path.

    Sample body:

    {
      "expression" : [ {
        "paths" : [ "/infra/segments/Segment-01" ],
        "resource_type" : "PathExpression"
      } ],
      "_revision" : 0
    }