Unable to remove NSX IP Block after VPC/Project cleanup
search cancel

Unable to remove NSX IP Block after VPC/Project cleanup

book

Article ID: 422992

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • While cleaning up some VPC's within NSX, you are unable to remove the IP-Block which was once associated with a VPC.
  • Trying to delete via API results in the following error:
    DELETE https://nsx-mgr/policy/api/v1/infra/ip-blocks/<ip-block-UUID>
    IpAddressBlock /infra/ip-blocks/<ip-block-uuid> cannot be deleted as it is being referenced by other objects.
    paths = [[/orgs/default/projects/<project_name>/vpcs/<VPC_name>/subnets/<subnet_name>/ip-pools/_static-ipv4--empty/ip-subnets/<subnet_uuid>]]."


Environment

NSX 9.x

Cause

'IpAddressPool record' and 'IpAddressPool subnet' is automatically created and attached to IP block. Due to this the user is unable to delete the IP Block via API or UI.

Resolution

  • The solution involves making Corfu DB edits. Recommendation is to open an SR with Broadcom support and provide the following info from NSX-Manager
    • /opt/vmware/bin/corfu_tool_runner.py -o showTable -n nsx -t IpAddressPool > pools.txt
    • /opt/vmware/bin/corfu_tool_runner.py -o showTable -n nsx -t IpAddressPoolSubnet > pool_subnets.txt
    • /opt/vmware/bin/corfu_tool_runner.py -o showTable -n nsx -t GenericPolicyRealizedResource > gprr.txt
    • /opt/vmware/bin/corfu_tool_runner.py -o showTable -n nsx -t IpAddressBlockUsage > ipaddressblockusage.txt
  • Output of request and response for API:
     DELETE https://nsx-mgr/policy/api/v1/infra/ip-blocks/<ip-block-UUID>