That's right, I need also that second hook event. For your information, for now I manage locks manually or via Ansible. To make hook manage locks, I still need to find out a secure way to run LVM commands from a non-root account, but this is another problem. Le 22 janvier 2020 10:24:53 GMT+01:00, Michal Privoznik <mprivozn@redhat.com> a écrit :>On 1/22/20 9:23 AM, Guy Godfroy wrote: >> I could launch `lvchange -asy` on the source host manually, but the >aim >> of hooks is to automatically execute such commands and avoid human >errors. > >Agreed. However, you would need two hooks actually. One that is called >on the source when the migration is started, and the other that is >called on the destination when the migration is finished (so that you >can promote the shared lock to the exclusive again). Just out of >curiosity - how do you handle the lock promoting? > >Michal-- Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
So, how likely is it possible to get this feature (two new events for the qemu hook)? Le 22/01/2020 à 10:56, Guy Godfroy a écrit :> That's right, I need also that second hook event. > > For your information, for now I manage locks manually or via Ansible. > To make hook manage locks, I still need to find out a secure way to > run LVM commands from a non-root account, but this is another problem. > > Le 22 janvier 2020 10:24:53 GMT+01:00, Michal Privoznik > <mprivozn@redhat.com> a écrit : > > On 1/22/20 9:23 AM, Guy Godfroy wrote: > > I could launch `lvchange -asy` on the source host manually, > but the aim of hooks is to automatically execute such commands > and avoid human errors. > > > Agreed. However, you would need two hooks actually. One that is called > on the source when the migration is started, and the other that is > called on the destination when the migration is finished (so that you > can promote the shared lock to the exclusive again). Just out of > curiosity - how do you handle the lock promoting? > > Michal > > > -- > Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez > excuser ma brièveté.
On 1/23/20 1:43 PM, Guy Godfroy wrote:> So, how likely is it possible to get this feature (two new events for > the qemu hook)?I've started writing it, but then I realized we might need third hook - in confirm phase - which would be run on the source when quemu switches control over to the destination, or when migration failed. And this is what I need to figure out, how to differentiate these two states on the hook script level. Michal