Error while deleting Network "Cannot delete, object is referred by: "
search cancel

Error while deleting Network "Cannot delete, object is referred by: "

book

Article ID: 413438

calendar_today

Updated On:

Products

VMware Avi Load Balancer

Issue/Introduction

  • Cannot delete a vip network that is not used by any service (0 allocated IPs)
  • The below error is encountered while deleting the network object even if there is no IP used from the static pool on the network.

    Error:

    Cannot delete, object is referred by: ['VirtualService HTTP_####', 'VirtualService leader-#####',"VirtualService ako-leader-Shared-##-#', VsVip HTTP_VS-#####', 'VsVip leader-dnsvs-#####', 'VsVip ako-leader--Shared-##-#']

 

Environment

Avi Load Balancer

Cause

  • This issue occurs when duplicate subnets are configured across multiple networks or port groups.
  • The issue stems from the following logic:
  • Two or more networks/port groups are configured with the same subnet CIDR but usually with different static IP ranges.
  • When a Virtual Service is created in this subnet, the Controller updates references for all networks/port groups that share that specific subnet.
  • Even if a specific network object has no IPs allocated from its static pool, the Controller retains an internal reference to it because of the shared subnet.
  • This can be confirmed by reviewing /opt/avi/log/network_mgr.log, where the Virtual Service will be seen referencing both port groups/networks.
DEBUG [network_manager._IpToNetwork:311] $$ IpToNetwork Rsp:
ip_networks {
  ip {
    addr: "172.#.#.#"
    type: V4
  }
  network_uuid: "dvportgroup-###-cloud-#######-#####-#####-###-########"
  network_uuid: "dvportgroup-###-cloud-#######-#####-#####-###-########"
  subnet {
    ip_addr {
      addr: "172.#.#.#"
      type: V4
    }
    mask: 24
  }
  subnet {
    ip_addr {
      addr: "172.#.#.#"
      type: V4
    }
    mask: 24
  }
}

 

Resolution

Workaround:

1) Disable/Enable all the virtual service in the network. This will have traffic impact.

OR

2) Warm reboot the controller cluster.

Login to CLI of the controller
Execute the below commands

#shell
>terminal unhide
>reboot warm

 

Note:

This would warm reboot the cluster with no impact to datapath traffic. 
The controller UI will not be available for some time.

Additional Information

We would be restricting duplicate subnet configuration on multiple networks in the upcoming releases.