Pacemaker always knows where its resources are running. Query it, stop the domain, then use the queried location as the host to which to issue the snapshot?

Cheers, 

Peter 

On Mon, 15 Oct 2018, 20:36 Lentes, Bernd, <bernd.lentes@helmholtz-muenchen.de> wrote:
Hi,

i have a two node cluster with virtual guests as resources.
I'd like to snapshot the guests once in the night and thought i had a procedure.
But i realize that things in a cluster are a bit more complicated than expected :-))

I will shutdown the guests to have a clean snapshot.
I can shutdown the guests via pacemaker.
But then arises the first problem:

When i issue a "virsh snapshot-create-as" libvirt needs the domain name as a parameter.
but libvirt does not know the domains any longer. When the guests are shutdown a "virsh list --all"
on both nodes does not show any domain.

A look in the respective resource agent VirtualDomain explains why:
The domain is started with virsh create:

"# The 'create' command guarantees that the domain will be
# undefined on shutdown, ...

OK: Now i could of course define all domains with a virsh define.

But then i have immediately the next problem. Now i'd create the snapshots with
"virsh snapshot-create-as" and starts the domains afterwards via cluster.
But let's assume i issue that on node 1 and some guests are started afterwards via pacemaker on node 2.
I can't predict on which node the guests are starting.

Then i don't get a snapshot, right ?

What to do ?

Bernd



--

Bernd Lentes
Systemadministration
Institut für Entwicklungsgenetik
Gebäude 35.34 - Raum 208
HelmholtzZentrum münchen
[ mailto:bernd.lentes@helmholtz-muenchen.de | bernd.lentes@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


_______________________________________________
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users