Re: [ClusterLabs] crm resource stop VirtualDomain - how to know when/if VirtualDomain is really stopped ?

2018-10-11 Thread Lentes, Bernd


- On Oct 11, 2018, at 4:26 PM, Kristoffer Grönlund kgronl...@suse.de 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: 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


Re: [ClusterLabs] crm resource stop VirtualDomain - how to know when/if VirtualDomain is really stopped ?

2018-10-11 Thread Kristoffer Grönlund
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


[ClusterLabs] crm resource stop VirtualDomain - how to know when/if VirtualDomain is really stopped ?

2018-10-11 Thread Lentes, Bernd
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 ?

Thanks.


Bernd

-- 

Bernd Lentes 
Systemadministration 
Institut für Entwicklungsgenetik 
Gebäude 35.34 - Raum 208 
HelmholtzZentrum münchen 
[ mailto:bernd.len...@helmholtz-muenchen.de | 
bernd.len...@helmholtz-muenchen.de ] 
phone: +49 89 3187 1241 
fax: +49 89 3187 2294 
[ http://www.helmholtz-muenchen.de/idg | http://www.helmholtz-muenchen.de/idg ] 

wer Fehler macht kann etwas lernen 
wer nichts macht kann auch nichts lernen
 

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: 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