<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-04-15 4:38 GMT+08:00 Chet Burgess <span dir="ltr"><<a href="mailto:cfb@metacloud.com" target="_blank">cfb@metacloud.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class="">On Fri, Apr 14, 2017 at 1:27 PM, Matt Riedemann <span dir="ltr"><<a href="mailto:mriedemos@gmail.com" target="_blank">mriedemos@gmail.com</a>></span> wrote:<br></span><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The GET /servers/{server_id}/migration<wbr>s API only lists in-progress live migrations. This is an artifact of when it was originally introduced as the os-migrations API which was tightly coupled with the API operation to cancel a live migration.<br>
<br>
There is a spec [1] which is now approved which proposes to expand that to also return other types of in-progress migrations, like cold migrations, resizes and evacuations.<br>
<br>
What I don't like about the proposal is that it still filters out completed migrations from being returned. I never liked the original design where only in-progress live migrations would be returned. I understand why it was done that way, as a convenience for using those results to then cancel a live migration, but seriously that's something that can be filtered out properly.<br>
<br>
So what I'd propose is that in a new microversion, we'd return all migration records for a server, regardless of status. We could provide a status filter query parameter if desired to just see in-progress migrations, or completed migrations, etc. And the live migration cancel action API would still validate that the requested migration to cancel is indeed in progress first, else it's a 400 error.<br>
<br>
The actual migration entries in the response are quite detailed, so if that's a problem, we could change listing to just show some short info (id, status, source and target host), and then leave the actual details for the show API.<br>
<br>
What do operators think about this? Is this used at all? Would you like to get all migrations and not just in-progress migrations, with the ability to filter as necessary?<br>
<br>
[1] <a href="https://review.openstack.org/#/c/407237/" rel="noreferrer" target="_blank">https://review.openstack.org/#<wbr>/c/407237/</a></blockquote><div><br></div></span><div>+1</div><div><br></div><div>I would love to see this. Our support team frequently has to figure out the "history" of a VM and today they have to use tool that relies on logs and/or the DB to figure out where a VM used to be and when it was moved. It would wonderful if that whole tool can just be replaced with a single call to the nova API to return a full history.</div></div></div></div></blockquote><div><br></div><div>Chet, do you have requirement to query the migrations for multiple VMs? '/servers/{uuid}/migrations' will pain for that.</div><div><br></div><div>Also note that, we still have the API '/os-migrations', it will return all the migration records in any status for all the VMs, and it supports filters like 'instance_uuid', 'status', and 'migration_type' etc. I can't remember clearly whether we said we will deprecated it, at least for now, we didn't deprecate it yet. Want to figure whether it still have some useful use-case for query multiple VMs' migration records.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
<br></blockquote></div><br></div></div>