Skip to content

Instantly share code, notes, and snippets.

@kmadac
Last active December 20, 2015 04:49
Show Gist options
  • Save kmadac/6074003 to your computer and use it in GitHub Desktop.
Save kmadac/6074003 to your computer and use it in GitHub Desktop.
Create provider network
Storage provider network will be on interface eth2. I need to put eth2 to ovs bridge. I called it br-stor
root@ostack-grizzly:/etc/network# sudo ovs-vsctl add-br br-stor
root@ostack-grizzly:/etc/network# sudo ovs-vsctl add-port br-stor eth2
Storage bridge br-stor has to be mapped to physical network. I called it storage-net and network_vlan_ranges have to be set without defining vlans. Add following two lines into /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini
network_vlan_ranges = storage-net
bridge_mappings = storage-net:br-stor
Restart quantum services:
root@ostack-grizzly:/etc/init.d# cd /etc/init.d/; for i in $( ls quantum-* ); do sudo service $i restart; done
And create provider network in admin tenant:
root@ostack-grizzly:/etc/init.d# keystone tenant-list
+----------------------------------+---------+---------+
| id | name | enabled |
+----------------------------------+---------+---------+
| 6ed0f3ea6ded4e93b332f9f09445147d | admin | True |
| fd72d988e9b44e7cb86d621d9206f82b | kmadac | True |
| e89b8887f2f94b9aa05aca5fe2b0e2b9 | service | True |
+----------------------------------+---------+---------+
Create shared provider network. It has to be shared to be able to use it by all tenants.
root@ostack-grizzly:/etc/init.d# quantum net-create storage --shared --tenant_id 6ed0f3ea6ded4e93b332f9f09445147d --provider:network_type flat --provider:physical_network storage-net
Created a new network:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | b66205c6-96c9-4d05-a711-850bb18e93b3 |
| name | storage |
| provider:network_type | flat |
| provider:physical_network | storage-net |
| provider:segmentation_id | |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 6ed0f3ea6ded4e93b332f9f09445147d |
+---------------------------+--------------------------------------+
Create subnet for tenant kmadac (do not create it for admin tenant):
root@ostack-grizzly:/etc/init.d# quantum subnet-create --tenant_id fd72d988e9b44e7cb86d621d9206f82b --name storage_subnet --no-gateway --allocation-pool start=60.60.1.50,end=60.60.1.150 storage 60.60.1.0/24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment