On Thu, 2018-10-11 at 13:59 +0200, Lentes, Bernd wrote: > Hi, > > i'm trying to write a script which shutdown my VirtualDomains in the > night for a short period to take a clean snapshot with libvirt. > To shut them down i can use "crm resource stop VirtualDomain". > > But when i do a "crm resource stop VirtualDomain" in my script, the > command returns immediately. How can i know if my VirtualDomains are > really stopped, because the shutdown may take up to several minutes. > > I know i could do something with a loop and "crm resource status" and > grepping for e.g. stopped, but i would prefer a cleaner solution. > > Any ideas ?
You should be able to pass -w to crm, crm -w resource stop VirtualDomain That should wait until the policy engine settles down again. Cheers, Kristoffer > > Thanks. > > > Bernd > _______________________________________________ Users mailing list: Users@clusterlabs.org https://lists.clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org