cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anurag Awasthi <Anurag.Awas...@shapeblue.com>
Subject Re: Querying async job result
Date Thu, 08 Aug 2019 08:52:55 GMT
Hi Rakesh,

You seem to be doing the right thing. I think what you have encoutered is a bug in prepareForMaintenance
API. The host tends to be stuck in that state in some scenarios. Perhaps, when a VM enters
an error state. I would advise canceling maintenance mode and examining what states the VMs
are in. Ensure there are no unexpected errors on VMs, clean them up manually if needed. Then
retry prepare for maintenance mode.

There is an open PR for fixing this issue as well - https://github.com/apache/cloudstack/pull/3425
. While this got sidetracked as we worked on 4.13.0, this will make it in 4.13.1.

Kind Regards,
Anurag
________________________________
From: Rakesh Venkatesh <www.rakeshv.com@gmail.com>
Sent: Thursday, August 8, 2019 2:09 PM
To: users@cloudstack.apache.org <users@cloudstack.apache.org>; dev@cloudstack.apache.org
<dev@cloudstack.apache.org>
Subject: Querying async job result

Hello


I want to know what is the best way to query the async job result using
queryAsyncJobResult api. According to the documentation in
http://docs.cloudstack.apache.org/projects/archived-cloudstack-getting-started/en/latest/dev.html
,
the "jobstatus" of 1 means the command completed but im facing an issue
where even though the command is still running, the "jobstatus" is always 1.

Im running "prepareHostForMaintenance" command which returns the jobid.
When I run queryAsyncJobResult for this jobid, the jobstatus will always be
1 even though the hypervisor is still not in maintenance mode.

So can anyone tell me what is the best way to check if the hypervisor is in
maintenance mode or not? Im using 4.11 version


Below are the result which I get


"resourcestate": "PrepareForMaintenance",
"jobresultcode": 0,
  "jobresulttype": "object",
  "jobstatus": 1,

--
Thanks and regards
Rakesh venkatesh

Anurag.Awasthi@shapeblue.comĀ 
www.shapeblue.com
Amadeus House, Floral Street, London  WC2E 9DPUK
@shapeblue
  
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message