DescriptionMahendra Takwale
2014-02-25 08:15:34 UTC
Created attachment 867283[details]
rhevm engine log
Description of problem:
A host on which virtual machine was running crashes causing VM to go into unknown state. In such scenario, RHEV-M shows VM state along with associated host. However, if we try to retrieve the host associated with such VM using REST API it returns NULL.
This behavior is different than what we have observed in RHEV 3.1 and 3.2.
We are retrieving the host associate VM to initiate manual fencing using REST API in case of host crash.
If everything is working then the query returns:
# /usr/bin/curl --silent --fail --insecure --request GET --data "" --user admin@internal:admin123 --basic --url https://rhevm.example.com:443/api/vms/bec376c5-36a5-43c5-a6de-9e7fbdcf263f --show-error --header "Accept:application/xml" | /usr/bin/xpath "string(vm/host/@id)"
Query didn't return a nodeset. Value: 46a8288a-d3f6-43b0-8fd6-33524eac9be7
#
But if the host is down and vm is in unknown state then the query returns
# /usr/bin/curl --silent --fail --insecure --request GET --data "" --user admin@internal:admin123 --basic --url https://rhevm.example.com:443/api/vms/bec376c5-36a5-43c5-a6de-9e7fbdcf263f --show-error --header "Accept:application/xml" | /usr/bin/xpath "string(vm/host/@id)"
Query didn't return a nodeset. Value:
#
Version-Release number of selected component (if applicable):
3.3
How reproducible:
Poweroff the host on which virtual machine is running and check the host and VM state. Once the host goes into "Non Responsive" state, check VM state, it goes into "unknown" state. use REST API to retrieve the host id associated with that particular VM
Steps to Reproduce:
1.
2.
3.
Actual results:
The REST API returns the empty string while RHEV-M console shows the host name
Expected results:
The REST API should return then host id. Also, the VM should not be in unknown state.
Additional info: