VS Deletion fails with VS name using Macro API
search cancel

VS Deletion fails with VS name using Macro API

book

Article ID: 436418

calendar_today

Updated On:

Products

VMware Avi Load Balancer

Issue/Introduction

Virtual Service deletion may fail when using the Macro API (DELETE /api/macro)

  • with the name of the Virtual Service, resulting in the error "ERROR: column "tenant_uuid" does not exist (SQLSTATE 42703)".

  • with other referenced object fields in the API body, such as vsvip_ref_data 403, resulting in the error "Cannot delete, object is referred by: ['VirtualService xxxx']"

Environment

Avi Loadbalancer

Versions 22.1.1 - 22.1.7

Versions 30.2.1 - 30.2.7

Versions 31.2.1 - 31.2.2

Cause

This issue is caused due to an error in the internal lookup logic when using the VS name for the Macro API.

Resolution

This issue will be fixed in future maintenance release.

As a workaround, instead of using the VS name in the API body, use the UUID of the VS as shown below.

{
    "model_name":"VirtualService",
    "data": 
    {
        "uuid": "virtualservice-xxxx-xxxx-xxxx-xxxx-xxxx"
    }
} 

Documentation on how to find the uuid of a VS - Find Virtual Service UUID

 

Note:

  • When using DELETE Macro API, If the VS to be deleted is the last VS in the SE Group, then the SE Group will also be deleted .
  • Additionally when the SEG is a Default-Group, then the delete of the last VS in the group will fail with:
{
    "error": "Cannot delete system default object",
    "obj_name": "Default-Group"
}
  • The workaround is to have a dummy VS in the SEG when using DELETE Macro API.