----- Original Message -----
From: "Nir Soffer" <nsoffer(a)redhat.com>
To: "Adam Litke" <alitke(a)redhat.com>
Cc: "devel" <devel(a)ovirt.org>, "Francesco Romani"
<fromani(a)redhat.com>, "Federico Simoncelli" <fsimonce(a)redhat.com>,
"Dan Kenigsberg" <danken(a)redhat.com>, "Allon Mureinik"
<amureini(a)redhat.com>, "Daniel Erez" <derez(a)redhat.com>,
"Michal Skrivanek" <mskrivan(a)redhat.com>, "Eric Blake"
<eblake(a)redhat.com>
Sent: Saturday, June 13, 2015 11:14:03 PM
Subject: Re: Libvirt secrets management - take 2
[...]
> >Flows
> >=====
> >
> >Start vm
> >--------
> >- Engine add required secrets to vm description
> >- Vdsm register temporary secrets with libvirt
> >- When vm is up or if operation failed, Vdsm remove the temporary secret
> >
> >Migrate vm
> >----------
> >- Engine add required secrets to vm description
> >- Vdsm add secrets to the vm description sent to the destination
> >- On the destination, Vdsm register temporary secrets with libvirt
> >- On the destination, when vm is up or if operation failed, Vdsm remove
> > the temporary secret
On issue with migration - do we have to keep the same auth information as in
the original vm xml, or we can create the vm on the destination using different
auth xml?
I don't have an answer for this. Need to check and play with this a bit.
> >Hot-plug disk
> >-------------
> >- Engine add secret to disk description
> >- Vdsm register temporary secret with libvirt
> >- When disk is successfully plugged, or if operation failed, Vdsm remove
> > the temporary secret
OK, what if this VM is migrate afterwards? destination VDSM needs to register this secret
to libvirt.
The fact here is that is the source VDSM that orchestrates the migration, and if it has
forgorgotten the secret, then we need get it back again from Engine and pass it through
the destination VM.
On migration, it is the source VM which orchestrates the flow. Engine polls source VM for
updates,
and consider the VM migrated only after source exited correctly.
I don't recall the fine details engine side (need to check), but on VDSM side:
- source VDSM receives VM.migrate(destination_uri)
- source VDSM sends migrationCreate to destination VDSM
- once destination VDSM created special-purpose VM, source VDSM instructs libvirt to start
the migration
- source VDSM monitors the migration, report progress, updates the downtime
- migration fails: source VDSM automatically send VM.destroy to destination VDSM
- migration succeeds: source VDSM destroy source VM, execution now continues on
destination VM
so far, Engine talks with destination VM only if migration completed succesfully (unless
I'm missing something :))
so we need to pass back again all the needed secrets as part of VM.migrate verb
This is only the very first thought of mine, we can probably think something cleaner.
Bests,
--
Francesco Romani
RedHat Engineering Virtualization R & D
Phone: 8261328
IRC: fromani