<div dir="ltr">Agree.  Why not both.  and will use created_at to work out how long the migration has been<br>running.<div><br></div><div><br></div><div>Paul, thank you very much for the suggestion. </div><div><br></div><div>BR.</div><div>Shaohe Feng </div><div><br></div><div><br><div class="gmail_extra"><br><div class="gmail_quote">2015-11-26 19:10 GMT+08:00 Paul Carlton <span dir="ltr"><<a href="mailto:paul.carlton2@hpe.com" target="_blank">paul.carlton2@hpe.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><div><div class="h5">
    <div>On 26/11/15 10:48, 少合冯 wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Now, we are agree on getting more migration status
        details info are useful. 
        <div><br>
        </div>
        <div>But How do we get them?</div>
        <div>By REST API or Notification?  </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><span style="color:rgb(102,102,0);font-family:monospace;font-size:12px;white-space:pre-wrap">IF by API, d</span>oes
          the  <span style="color:rgb(0,136,0);font-family:monospace;font-size:12px;white-space:pre-wrap">"time_elapsed"</span><span style="font-family:monospace;font-size:12px;white-space:pre-wrap"><font color="#666600"> is needed? </font></span></div>
        <div><span style="font-family:monospace;font-size:12px;white-space:pre-wrap"><font color="#666600">
</font></span></div>
        <div><span style="font-family:monospace;font-size:12px;white-space:pre-wrap"><font color="#666600"> For there is a </font></span><span style="color:rgb(0,0,0);font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;white-space:pre-wrap">"created_at" field. </span><br>
        </div>
        <div><span style="color:rgb(0,0,0);font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;white-space:pre-wrap"> But IMO, it is base on the </span><span style="color:rgb(0,0,0);font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;white-space:pre-wrap">time of</span><span style="color:rgb(0,0,0);font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;white-space:pre-wrap"> the conductor server? </span></div>
        <div><span style="color:rgb(0,0,0);font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;white-space:pre-wrap"> The time_elapsed can get from libvirt, which from t</span><span style="color:rgb(0,0,0);font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;white-space:pre-wrap">he hypervisor. </span></div>
        <div><span style="color:rgb(0,0,0);font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;white-space:pre-wrap"> Usually, there are ntp-server in the cloud. and we can get the time_elapsed by "created_at".</span></div>
        <div><span style="font-family:monospace;font-size:12px;white-space:pre-wrap"><span style="font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;font-size:small;color:rgb(0,0,0)"> but not sure there will be the case: </span></span></div>
        <div><span style="font-family:monospace;font-size:12px;white-space:pre-wrap"><span style="font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;font-size:small;color:rgb(0,0,0)">    the time of hypervisor and </span></span><span style="color:rgb(0,0,0);font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;white-space:pre-wrap">conductor </span><span style="font-family:monospace;font-size:12px;white-space:pre-wrap"><span style="font-family:'Lucida Console','Lucida Sans Typewriter',Monaco,monospace;font-size:small;color:rgb(0,0,0)">server host are out of sync?</span><font color="#666600">
</font></span></div>
      </div>
    </blockquote></div></div>
    Why not both.  Just update the _monitor_live_migration method in the
    libvirt<br>
     driver (and any similar functions in other drivers if they exist)
    so it updates<br>
     the migration object and also sends notification events.  These
    don't have<br>
     to be at 5 second intervals, although I think that is about right
    for the <br>
    migration object update.  Notification messages could be once event
    30<br>
     seconds or so.<br>
    <br>
    Operators can monitor the progress via the API and orchestration
    utilities<br>
     to consume the notification messages (and/or use API).<br>
    This will enable them to identify migration operations that are not
    making<br>
     good progress and take actions to address the issue.<br>
    <br>
    The created_at and updated_at fields of the migration object should
    be<br>
    sufficient to allow the caller to work out how long the migration
    has been<br>
    running for (or how long it took in the case of a completed
    migration).<br>
    <br>
    Notification payload can include the created_at field or not.  I'd
    say not.<br>
    There will be a notification message generated when a migration
    starts<br>
    so subsequent progress messages don't need it, if the consumer wants<br>
    the complete picture they can call the API.<br>
    <br>
    <br>
    <pre cols="72">-- 
Paul Carlton
Software Engineer
Cloud Services 
Hewlett Packard
BUK03:T242
Longdown Avenue
Stoke Gifford
Bristol BS34 8QZ

Mobile:    <a href="tel:%2B44%20%280%297768%20994283" value="+447768994283" target="_blank">+44 (0)7768 994283</a>
Email:    <a href="mailto:paul.carlton2@hpe.com" target="_blank">mailto:paul.carlton2@hpe.com</a>
Hewlett-Packard Limited registered Office: Cain Road, Bracknell, Berks RG12 1HN Registered No: 690597 England. 
The contents of this message and any attachments to it are confidential and may be legally privileged. If you have received this message in error, you should delete it from your system immediately and advise the sender. To any recipient of this message within HP, unless otherwise stated you should consider this message and attachments as "HP CONFIDENTIAL".

</pre>
  </div>

</blockquote></div><br></div></div></div>