How to Force Remove offline host from PCD Using API call?
Problem
API-driven forced removal of an offline host in PCD.
Environment
Private Cloud Director Virtualization
Self-Hosted Private Cloud Director Virtualization
Procedure
Obtain an API token using the OpenStack CLI:
$ openstack token issue -f value -c idIdentify the Host ID of the offline host from the UI or using below api call:
$ curl -X GET \\
-H "X-Auth-Token: <TOKEN_ID>" \\
"https://<PCD_FQDN>/resmgr/v2/hosts" \\
| jq '[.[] | {id, hostname: .info.hostname, responding: .info.responding}]'$ curl -s -X GET \\
-H "X-Auth-Token: <TOKEN_ID>" \\
"https://[example-region1.app.pcd.platform9.com]/resmgr/v2/hosts" \\
| jq '[.[] | {id, hostname: .info.hostname, responding: .info.responding}]'
[
{
"id": "[HOST_ID_1]",
"hostname": "[HOST_NAME_1]",
"responding": true
},
{
"id": "[HOST_ID_2]",
"hostname": "[HOST_NAME_2]",
"responding": false
},
]Force Remove the Host:
Once the Host is removed, the associated compute service and network agents must be deleted.
Note the ID of compute service and network agents.
Delete the compute service and network agents associated to Host.
PreviousHow to Setup CLI in Virtual Environment for Troubleshooting?
NextHypervisor Stuck in N/A Scheduling State After Host Onboarding
Last updated
