Title
Create new category
Edit page index title
Edit category
Edit link
Unable to Delete Network Host Config from UI
Problem
Unable to delete network host config from the UI even if it is not being used by any host.
Environment
- Private Cloud Director Virtualization - v2025.4 and Higher
- Self-Hosted Private Cloud Director Kubernetes - v2025.4 and Higher
- Component: Host Configuration Management (resmgr database)
Cause
The host configuration was previously associated with a host that has since been decommissioned.
However, a stale mapping entry remains between the host and host configuration in the host_to_hostconfig_map table of the Resmgr database.
This issue is tracked under bug PCD-407 and is now fixed on PCD 2025.6-151 above release, which prevents new stale mappings from being created.
Existing stale entries from earlier versions will persist after the upgrade; it's recommended to follow the steps mentioned in the Resolution to delete the stale entries.
Diagnostics
- Retrieve the token:
token=$(openstack token issue -f value -c id)- Get the list of host configs:
curl -s -X GET -H "X-Auth-Token: $token" https://<REGION_FQDN>/resmgr/v2/hostconfigs | jq '.[] | {id, name}'​# Sample Output:{ "id": "[HOSTCONFIG_ID_1]", "name": "[HOSTCONFIG_NAME_1]"}{ "id": "[HOSTCONFIG_ID_2]", "name": "[HOSTCONFIG_NAME_2]"}{ "id": "[HOSTCONFIG_ID_3]", "name": "[HOSTCONFIG_NAME_3]"}- Get the list of hosts that use the host config that needs to be deleted:
curl -s -X GET -H "X-Auth-Token: $token" https://<REGION_FQDN>/resmgr/v2/hosts | jq -c '.[] | select(.hostconfig_id == "<HOSTCONFIG_ID>") | {id, hostname: .info.hostname, hostconfig_id}'​# Sample Output:{ "id": "[HOST_ID_1]", "hostname": "[HOSTNAME_1]", "hostconfig_id": "[HOSTCONFIG_ID]"}{ "id": "[HOST_ID_2]", "hostname": "[HOSTNAME_2]", "hostconfig_id": "[HOSTCONFIG_ID]"}Resolution
- Delete the stale host config mapping
Run below for each [HOST_ID]returned in the output of command executed in the point number 3 in Diagnostics section
curl -s -X DELETE -H "X-Auth-Token: $token" "https://<REGION_FQDN>/resmgr/v2/hosts/<HOST_ID>/hostconfig/<HOSTCONFIG_ID>"- Delete the host Configuration after removing all the mappings
curl -s -X DELETE \ -H "X-Auth-Token: $token" \ "https://<REGION_FQDN>/resmgr/v2/hostconfigs/<HOSTCONFIG_ID>"Validation
Check the UI to confirm that the previously stale host configuration no longer appears.