<div dir="ltr"><div><div><div><div>Create a volume transfer VM/machine in each region.<br> attache the volume -> dd -> compress  -> internet   ->decompress -> new volume, attache(/boot with) to the volume to the final machine.<br></div><div>In case you have frequent transfers you may keep up the machines for the next one..<br><br></div><div>In case the storage is just on the compute node: snapshot ->glance download ->glance upload<br></div><br></div>Would be nice if cinder/glance could take the credentials for another openstack and move the volume/image to another cinder/glance.<br><br></div>If you want the same IP , specify the ip at instance boot time (port create),<br> but you cannot be sure the same ip is always available or really route-able to different region.. unless... VPN like solution in place...<br></div><div><div> <br></div><div>The uuid not expected to be changed by the users or admins (unsafe),<br> but you can use other metadata for description/your uuid.<br></div><div><br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 17, 2018 at 11:43 PM, Jay Pipes <span dir="ltr"><<a href="mailto:jaypipes@gmail.com" target="_blank">jaypipes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 09/17/2018 09:39 AM, Peter Penchev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
So here's a possibly stupid question - or rather, a series of such :)<br>
Let's say a company has two (or five, or a hundred) datacenters in<br>
geographically different locations and wants to deploy OpenStack in both.<br>
What would be a deployment scenario that would allow relatively easy<br>
migration (cold, not live) of instances from one datacenter to another?<br>
<br>
My understanding is that for servers located far away from one another<br>
regions would be a better metaphor than availability zones, if only<br>
because it would be faster for the various storage, compute, etc.<br>
services to communicate with each other for the common case of doing<br>
actions within the same datacenter.  Is this understanding wrong - is it<br>
considered all right for groups of servers located in far away places to<br>
be treated as different availability zones in the same cluster?<br>
<br>
If the groups of servers are put in different regions, though, this<br>
brings me to the real question: how can an instance be migrated across<br>
regions?  Note that the instance will almost certainly have some<br>
shared-storage volume attached, and assume (not quite the common case,<br>
but still) that the underlying shared storage technology can be taught<br>
about another storage cluster in another location and can transfer<br>
volumes and snapshots to remote clusters.  From what I've found, there<br>
are three basic ways:<br>
<br>
- do it pretty much by hand: create snapshots of the volumes used in<br>
   the underlying storage system, transfer them to the other storage<br>
   cluster, then tell the Cinder volume driver to manage them, and spawn<br>
   an instance with the newly-managed newly-transferred volumes<br>
</blockquote>
<br></div></div>
Yes, this is a perfectly reasonable solution. In fact, when I was at AT&T, this was basically how we allowed tenants to spin up instances in multiple regions: snapshot the instance, it gets stored in the Swift storage for the region, tenant starts the instance in a different region, and Nova pulls the image from the Swift storage in the other region. It's slow the first time it's launched in the new region, of course, since the bits need to be pulled from the other region's Swift storage, but after that, local image caching speeds things up quite a bit.<br>
<br>
This isn't migration, though. Namely, the tenant doesn't keep their instance ID, their instance's IP addresses, or anything like that.<br>
<br>
I've heard some users care about that stuff, unfortunately, which is why we have shelve [offload]. There's absolutely no way to perform a cross-region migration that keeps the instance ID and instance IP addresses.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- use Cinder to backup the volumes from one region, then restore them to<br>
   the other; if this is combined with a storage-specific Cinder backup<br>
   driver that knows that "backing up" is "creating a snapshot" and<br>
   "restoring to the other region" is "transferring that snapshot to the<br>
   remote storage cluster", it seems to be the easiest way forward (once<br>
   the Cinder backup driver has been written)<br>
</blockquote>
<br></span>
Still won't have the same instance ID and IP address, which is what certain users tend to complain about needing with move operations.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- use Nova's "server image create" command, transfer the resulting<br>
   Glance image somehow (possibly by downloading it from the Glance<br>
   storage in one region and simulateneously uploading it to the Glance<br>
   instance in the other), then spawn an instance off that image<br>
</blockquote>
<br></span>
Still won't have the same instance ID and IP address :)<br>
<br>
Best,<br>
-jay<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
The "server image create" approach seems to be the simplest one,<br>
although it is a bit hard to imagine how it would work without<br>
transferring data unnecessarily (the online articles I've seen<br>
advocating it seem to imply that a Nova instance in a region cannot be<br>
spawned off a Glance image in another region, so there will need to be<br>
at least one set of "download the image and upload it to the other<br>
side", even if the volume-to-image and image-to-volume transfers are<br>
instantaneous, e.g. using glance-cinderclient).  However, when I tried<br>
it with a Nova instance backed by a StorPool volume (no ephemeral image<br>
at all), the Glance image was zero bytes in length and only its metadata<br>
contained some information about a volume snapshot created at that<br>
point, so this seems once again to go back to options 1 and 2 for the<br>
different ways to transfer a Cinder volume or snapshot to the other<br>
region.  Or have I missed something, is there a way to get the "server<br>
image create / image download / image create" route to handle volumes<br>
attached to the instance?<br>
<br>
So... have I missed something else, too, or are these the options for<br>
transferring a Nova instance between two distant locations?<br>
<br>
Thanks for reading this far, and thanks in advance for your help!<br>
<br>
Best regards,<br>
Peter<br>
<br>
<br>
<br></span>
______________________________<wbr>_________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
<br>
</blockquote>
<br>
______________________________<wbr>_________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
</blockquote></div><br></div>