Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 49146

Rest Call to remove a host, inexplicably is also removing the cluster even if other connected hosts

$
0
0

Vsphere Version 6.5.0.20000 Build 8815520

Issue:

Trying to Delete a host using the rest api deletes the whole cluster regardless of whether there are multiple hosts connected or disconnected.

Tool being used: Postman

Rest Json calls: https://raw.githubusercontent.com/vmware/vsphere-automation-sdk-rest/master/samples/postman/vSphere-Automation-Rest-API-… 

 

 

To recreate Autenticate against vsphere using the following command

POST: https://{{vc}}/rest/com/vmware/cis/session

Result: {

    "value": XXXXXXXXX

}

 

Get list of all hosts

GET https://{{vc}}/rest/vcenter/host

{

……

 

Delete one of the hosts (doesn’t matter if the host is connected or disconnected) or if the cluster it resides has other hosts or not

DELETE: https://{{vc}}/rest/vcenter/host/host-1225462

Output: Empty (Result: 200)

 

Findings:

Host and Cluster it belongs to are completed deleted. Confirmed via logs in vcenter despite the intention being just to delete the host.

This cluster delete happens even if the other hosts in the cluster and if they are connected and the final state is that all hosts are lost after running a single host delete command.

Looking at the logs show it disconnected host, removing the host and then unexpectingly deleting the cluster also.

 

I’ve tested this multiple times and in each case the cluster is remove (and all hosts belonging to it)

single cluster host connected,

single cluster host disconnected.

single cluster multiple hosts (other hosts connected)

 

Cluster has to be recreated and all hosts are required to be readded after running this command even once.

 

If there some sort of housekeeping process here, the docs says nothing about removal of cluster when removing host


Viewing all articles
Browse latest Browse all 49146

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>