Prelude: These steps should only be required until we are running on the latest version of OpenStack - Stein.

TL;DR Rename the existing instance and launch a new instance whilst opting to move the IP from the "old" instance.

Introduction

We recently moved away from Ceph as our storage medium in favour of NetApp's SolidFire. Ceph was great for us but one of the pain points was the loss of one disk (or even a disk being full) would take down the whole node. On top of this some of the pros of moving to SolidFire include guaranteed high (IOPS) performance and reliability.

There would inevitably be some shortcomings, though, especially as this is not the default solution for launching instances within OpenStack; one of those shortcomings would be rebuilding an instance in place - which is why you are probably reading this guide.

OpenStack

We are currently running on OpenStack Queens which is supported until June, 2021. But the functionality of rebuilding volume-backed instances in place has only just been introduced in the latest version of OpenStack - Stein (released April, 2019).

Our plan is to be upgraded to Stein by the end of this year (2019). We will then be able to re-enable the functionality to allow customers to rebuild their instances in place without having to follow this slightly longer method.

Example of Rebuilding an Instance

For this guide we will be using example.com for the hostname of the instance we want to rebuild.

Step One - Rename existing instance (Optional)

This step is only required if you want to reuse the hostname. If you don’t care about the hostname then skip this step and go to step 2.

  • Navigate to your instance (Instances -> click your instance hostname).
  • Click the edit (pencil) icon next to the hostname. Editing an instance hostname

  • Change the name (so you don't run into the unique hostname check when creating an instance with the same name) and press ENTER. Renamed instance hostname

Step Two - Launch a new instance

Next you will need to launch a new instance. First you must enter the hostname (for us that will be example.com). If you do not wish to reuse the hostname you can choose a new hostname.

You then have two options, you can either: - Select a template. - Select an existing snapshot to restore from.

You can then select any other options such as size, network, SSH key, etc.

The most important option to select is under "Public IP Address". Make sure you choose "Move from…" and then choose your existing instance from the dropdown menu which appears (for us that will be example.com-old).

Moving public IP from another instance

That’s it. You should now have a newly built instance which has retained the existing IP address.

Note The existing (old) instance will no longer have a public IP address assigned to it, although it is still accessible if you bounce to it via the private IP (e.g. via the "new" instance).