<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Hello,</p>
    <p>Is there any news about this feature ?</p>
    <p>Guy Godfroy<br>
    </p>
    <div class="moz-cite-prefix">Le 27/01/2020 à 15:06, Guy Godfroy a
      écrit :<br>
    </div>
    <blockquote type="cite" cite="mid:1580133965.58897.0@gugod.fr">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      <div id="geary-body" dir="auto">
        <div>Cool :)</div>
        <div>Don't worry I'm not on a rush: I guess the feature will not
          be part of Debian before next major release anyway.</div>
      </div>
      <div id="geary-quote" dir="auto"><br>
        Le ven., janv. 24, 2020 at 17:24, Michal Privoznik
        <a class="moz-txt-link-rfc2396E" href="mailto:mprivozn@redhat.com"><mprivozn@redhat.com></a> a écrit :<br>
        <blockquote type="cite">
          <div class="plaintext" style="white-space: pre-wrap;">On 1/24/20 4:34 PM, Guy Godfroy wrote:
<blockquote>I don't really understand what new hook this would be.
</blockquote>
Libvirt's migration happens in phases [1]. The last one is 'Confirm' where either the domain is either killed (because it's running on the destination successfully), or resumed (because there was an error).

If you make a lock shared at the beginning of the migration, but migration doesn't succeed you want to make it exclusive again in the Confirm phase. Or release it, because the domain is being killed (in which case we already run a hook script, so might get away with this specific case). Basically, in the hook called from the confirm phase you want to undo everything that the hook script called at the beginning of the migration has done.

BTW: I might have some time to work on this during weekend, but no promises. If you want to write patches though, I can give you some pointers and review them ;-)

Michal

1: <a href="https://libvirt.org/git/?p=libvirt.git;a=blob;f=src/libvirt-domain.c;h=4074397b30c3bba8b57d2058b3608234dd7a20ec;hb=HEAD#l2933" moz-do-not-send="true">https://libvirt.org/git/?p=libvirt.git;a=blob;f=src/libvirt-domain.c;h=4074397b30c3bba8b57d2058b3608234dd7a20ec;hb=HEAD#l2933</a>
</div>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>