VMware Cloud Foundation Network Pool delete is not available after a failed WLD creation, even though hosts are decommissioned
search cancel

VMware Cloud Foundation Network Pool delete is not available after a failed WLD creation, even though hosts are decommissioned

book

Article ID: 313789

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

Symptoms:
WLD Domain creation task fails during "Create VCF Domain Inventory Object Action" and a similar error log is present in /var/log/vmware/vcf/domainmanager/domainmanager.log on the SDDC Manager:
ERROR [vcf_dm,60a85256b1d98ee8,a786][c.v.v.c.f.a.BaseCreateVcfClusterObjectAction,dm-exec-5] Could not fetch network for type

Also the network pool used for the domain cannot be deleted, even though the hosts associated with it are decommissioned:
  •  Button in UI is grayed out with message that there are associated ESXi Hosts.
  • API delete request produce a similar error in /var/log/vmware/vcf/commonsvcs/vcf-commonsvcs.log: NETWORKPOOL_IPADDRESSES_IN_USE Deletion of network pool c38d14a8-2c95-4203-a846-9b8978b02e25 prevented. IP Addresses in use


Cause

A vSAN portGroup transportType is used in Domain Creation API, while the associated network pools of the hosts used, do not contain a vSAN network.

Resolution

Do not use the consumed IP addresses of the used network pool.

Workaround:
Manually delete the allocated IPs by the failed Domain Creation in the database, or the whole network_pool if it is not used by other hosts. Steps:
  1.  Log into the SDDC Manager and switch to root user
  2. Execute the following command for the network pool that needs to be deleted (name-of-network-pool in the example):
2.1 delete from vcf_network where id in (select vcf_network_id from vcf_network_and_network_pool where network_pool_id=(select id from network_pool where name='name-of-network-pool'));
2.2 delete from vcf_network_and_network_pool where network_pool_id=(select id from network_pool where name='name-of-network-pool');
2.3 delete from network_pool where name='name-of-network-pool';