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
NSX 4.x
Remove the Segment from the Group
Option 1:
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.
{ "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}{ "expression" : [ { "paths" : [ "/infra/segments/Segment-01" ], "resource_type" : "PathExpression" } ], "_revision" : 0}