----- On Oct 11, 2018, at 4:26 PM, Kristoffer Grönlund [email protected] wrote:
> 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 > Hi Kristoffer, Great ! That's what i need. Thanks. Bernd Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Aufsichtsratsvorsitzende: NN Stellv.Aufsichtsratsvorsitzender: MinDirig. Dr. Manfred Wolter Geschaeftsfuehrer: Prof. Dr. med. Dr. h.c. Matthias Tschoep, Heinrich Bassler, Dr. rer. nat. Alfons Enhsen Registergericht: Amtsgericht Muenchen HRB 6466 USt-IdNr: DE 129521671 _______________________________________________ Users mailing list: [email protected] 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
