Openstack Multi-Space Support

The first patches have landed in Juju edge that supports multi-space/multi-NIC support for Openstack.

If you want to begin testing this feature, there is no better way than with MicroStack.

Installing MicroStack via Snap is trivial and the process is outlined in the documentation. For brevity, simply run the following.

At the time of writing, only --edge with --devmode currently works. This is ongoing work to provide confinement to microstack.

sudo snap install microstack --edge --devmode
sudo microstack.init --auto --control

Out of the box, Microstack comes with a single internal test network, consisting of a single subnet.

microstack.openstack network list
+--------------------------------------+----------+--------------------------------------+
| ID                                   | Name     | Subnets                              |
+--------------------------------------+----------+--------------------------------------+
| a216626e-505b-4c55-984a-68a69b1f4eae | external | 8e8feea4-2fdb-4b53-8067-eec56d6a7729 |
| eda1ffba-ff39-4637-a56f-f271da23663f | test     | 18e2c4ea-0f98-4ad1-9d98-532bcef6016c |
+--------------------------------------+----------+--------------------------------------+

microstack.openstack subnet list
+--------------------------------------+-----------------+--------------------------------------+------------------+
| ID                                   | Name            | Network                              | Subnet           |
+--------------------------------------+-----------------+--------------------------------------+------------------+
| 18e2c4ea-0f98-4ad1-9d98-532bcef6016c | test-subnet     | eda1ffba-ff39-4637-a56f-f271da23663f | 192.168.222.0/24 |
| 8e8feea4-2fdb-4b53-8067-eec56d6a7729 | external-subnet | a216626e-505b-4c55-984a-68a69b1f4eae | 10.20.20.0/24    |
+--------------------------------------+-----------------+--------------------------------------+------------------+

In order to test with multiple spaces, we need to add another subnet to the internal network.

microstack.openstack subnet create --network test --subnet-range 192.168.223.0/24 --allocation-pool start=192.168.223.2,end=192.168.223.254 test-subnet-2
...

microstack.openstack subnet list
+--------------------------------------+-----------------+--------------------------------------+------------------+
| ID                                   | Name            | Network                              | Subnet           |
+--------------------------------------+-----------------+--------------------------------------+------------------+
| 18e2c4ea-0f98-4ad1-9d98-532bcef6016c | test-subnet     | eda1ffba-ff39-4637-a56f-f271da23663f | 192.168.222.0/24 |
| 3e961779-fbb1-4b7f-8d14-1741120d7479 | test-subnet-2   | eda1ffba-ff39-4637-a56f-f271da23663f | 192.168.223.0/24 |
| 8e8feea4-2fdb-4b53-8067-eec56d6a7729 | external-subnet | a216626e-505b-4c55-984a-68a69b1f4eae | 10.20.20.0/24    |
+--------------------------------------+-----------------+--------------------------------------+------------------+

With MicroStack now prepared with this network topology, we need to add it as a Juju cloud. This is also covered in the MicroStack documentation.

We have seen varying behaviour in versions of the MicroStack Snap. Some versions cause bootstrap to fail due to the inability to assign a public IP address.

If this happens, it is because when we added the subnets above, interfaces for them were not added to the virtual router that our networks are connected to. This can be fixed by invoking “microstack.openstack router add subnet <router> <subnet>”.

Alternatively you can use the MicroStack web UI and add the required interface(s) by clicking on the router.

If you created the subnets in OpenStack after bootstrapping, you will have to make Juju aware of them by executing:

juju reload-spaces

At present, reload-spaces must be issued against each existing model. If bootstrapping after the new subnets exist, the command is not required - all new models will detect the new network topology.

Then let’s create some spaces via:

juju add-space space-1 192.168.222.0/24

and:

juju add-space space-2 192.168.223.0/24

Then create a machine constrained to be in both of these spaces.

juju add-machine --constraints "spaces=space-1,space-2"

Once the machine is created we can see that it has 2 addresses; one in each of the spaces.

juju show-machine 0

machines:
  "0":
    juju-status:
      current: pending
      since: 19 Feb 2020 12:54:12+01:00
    dns-name: 10.20.20.214
    ip-addresses:
    - 10.20.20.214
    - 192.168.222.16
    - 192.168.223.164
    instance-id: b90595bc-5b77-455c-b528-5be1a5a05ec4
    machine-status:
      current: running
      message: ACTIVE
      since: 19 Feb 2020 12:55:02+01:00
    modification-status:
      current: idle
      since: 19 Feb 2020 12:54:12+01:00
    series: bionic
    constraints: spaces=space-1,space-2
    hardware: arch=amd64 cores=1 mem=2048M root-disk=20480M availability-zone=nova

In forthcoming patches, we will be ensuring this plays nicely with bindings and teardown.

3 Likes

Great work folks. Exciting stuff!

Hey guys any update/blogpost or documentation around this feature?