|
|
Line 1: |
Line 1: |
| == Routed Provider Network == | | == Routed Provider Network == |
| | | |
− | '''This page is a HUGE work in progress!'''
| + | Let's take this discussion to the [https://etherpad.openstack.org/p/routed-provider-networks-notes etherpad]. |
− | | |
− | As I've been working on routed networks patches, I decided that I should share how I am setting up my environment and using them.
| |
− | | |
− | To avoid dependence on the neutron client work that is in progress, I'm using Postman 4, a Chrome extension, to generate my API requests. I make use of its "Environments" feature to capture certain things that can change from time to time so that my requests are generally reusable. At the time of this writing, I have the following values defined in an environment:
| |
− | | |
− | : admin_token:REDACTED
| |
− | : devstack_ip:10.224.24.223
| |
− | : segmented_network:a2d4c3b3-9a45-426b-a2d4-76b74198550e
| |
− | : segment_1:491854b4-4715-48ef-8e29-ca1fb3b48fdb
| |
− | : segment_2:608a33b7-c03b-4595-acc2-8ac8a927250b
| |
− | | |
− | We discuss this work [[Meetings/Neutron-Routed-Networks|weekly in this meeting]].
| |
− | === Segment CRUD ===
| |
− | {| class="wikitable"
| |
− | |-
| |
− | | Patches || https://review.openstack.org/#/c/296603
| |
− | |-
| |
− | | TODO ||
| |
− | |}
| |
− | There first thing is to enable segment CRUD. It is a service plugin that isn't enabled by default. First, edit
| |
− | you have the patch, edit ''/etc/neutron/neutron.conf'' and append ''segments'' to the list of ''service_plugins''. Here's mine:
| |
− | | |
− | : service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin, segments
| |
− | | |
− | Since ''segments'' is defined in ''setup.cfg'', you actually need to reinstall neutron for this to work. In devstack, I just do this:
| |
− | | |
− | : $ cd /opt/stack/neutron
| |
− | : $ sudo pip install -e file://$PWD
| |
− | | |
− | There is one more change you need to do assuming you're going to use vlans and ML2. You need to edit ''/etc/neutron/plugins/ml2/ml2_conf.ini'' to add your physnets and vlan ranges. I just use the same vlan segment id for each segment. But, the physnet has to be different for each segment.
| |
− | | |
− | : [ml2_type_vlan]
| |
− | : network_vlan_ranges = segment-1:2000:2000, segment-2:2000:2000
| |
− | | |
− | At this point, restart the neutron service and then you should be able to create a multi-segmented network. [http://paste.openstack.org/show/495985/ This paste shows a details request / response]. Note that it is not possible to create a multi-segmented network using the ''python-neutronclient'' at this time.
| |
− | | |
− | It is also not yet possible to create, delete, or update segments on an existing network. But it is possible to [http://paste.openstack.org/show/495986/ list segments by network]. Future patch sets will build on this capability.
| |
− | | |
− | === Associating Subnets to Segments ===
| |
− | {| class="wikitable"
| |
− | |-
| |
− | | Patches || https://review.openstack.org/#/c/288774
| |
− | |-
| |
− | | TODO ||
| |
− | |}
| |
− | There is a database migration. After applying the patch, you'll need to run the migration:
| |
− | | |
− | : Stop the neutron server
| |
− | : $ neutron-db-manage upgrade heads
| |
− | : Start the neutron server
| |
− | | |
− | Once you've done this, you should be able create some subnets which are associated to segments. See [http://paste.openstack.org/show/495989/ this paste] and [http://paste.openstack.org/show/495991/ this paste] for request / response examples.
| |
− | | |
− | === Port creates and updates ===
| |
− | {| class="wikitable"
| |
− | |-
| |
− | | Patches || https://review.openstack.org/#/c/304886/ https://review.openstack.org/#/c/299591 (Nova)
| |
− | |-
| |
− | | TODO ||
| |
− | |}
| |
− | This is where I'm spending most of my time working. Basically, my goal here is to allow a [http://paste.openstack.org/show/492496/ port create with host binding info] to allocate from the right segment. This is some work in IPAM which I'm working on starting with [https://review.openstack.org/#/c/304886/ this patch].
| |
− | | |
− | The next step will be to allow a port create without host binding to defer IP allocation until a follow up [http://paste.openstack.org/show/492497/ port update with host binding info]. In order for Nova to work with deferred IP allocation, we'll need the Nova patch.
| |