Hi Klaus,

 

Thanks great for idea with alerts. I think about it too, the question is how to 
reach target state and know it’s reached for sure. Our process is daemon, so 
theoretically it can take cluster/resource state on start and then keep 
cluster’s “alter-ego” actual by alerts. But there always some risks of async 
updates: some message lost, e.t.c.. In practical meaning, it seems to build a 
list of resource ids send to stop and then ask crm_mon --output-as xml, say, 
each 20ms, for checking “if all the ids for the list are stopped”. As 
everything stopped, we are here! It will round delay to 20ms chunks, but it 
should be better then simple 100ms delay without checking I deployed. 100ms 
delay works well so far.

 

It seems like there no other options.

 

 

Is there any way to get a list of unfinished start/stop tasks? For sure, I can 
build the list of resource to be stopped and just check with crm_mon about its 
status unless everyone stopped or error, I can catch resource events and watch 
for every planned stop finished, but it looks simpler and more reliable to get 
active stop task list, if available.

 

Don't know if there is a way to acquire such a list in an (easy) way using 
public api.

Basically you might consider making your API asynchronous in that aspect.

Did you explore what alerts might give you? You might get notification about 
successful

stops / respectably failed stops more quickly and collect them to be used 
either by

the synchronous API or an asynchronous version.

 

_______________________________________________
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/

Reply via email to