HowTo Configure SDN Mechanism Driver Plugin for OpenStack

Version 22

    This post describes how to enable the SDN Mechanism Driver of OpenStack to allow Neutron notification of port or network updates.

    It is meant for developers or advanced OpenStack users.

     

    References

     

    Overview

    The SDN Mechanism Driver is used to send notifications to an SDN provider when there is a network/port event in OpenStack Neutron. It is used in case an action should be taken when there are changes in port/network configuration of the OpenStack cloud. For example: If you want to automatically configure VLANs on your network switches via an SDN provider, you can use this SDN Mechanism Driver that will send notifications from Neutron to the SDN provider and the SDN provider will be able to configure the switches accordingly.

    1%3Fauth_token%3D8d6bcd46a70fbfbdaf0de104f3d2b0328b1f170b

     

    The SDN Mechanism Driver sends the following HTTP commands:

    • Create new network (HTTP POST).
    • Update existing network (HTTP PUT).
    • Delete network (HTTP DELETE).
    • Update port (HTTP PUT).
    • Delete port (HTTP DELETE).
    • Bind port (Create new port - HTTP POST).

     

    Prerequisites

    • Neutron is configured with ML2 plugin.

     

    Installation

    python-networking-mlnx rpm is available in RDO repositories

    Note: For fedora rpms, see https://trunk.rdoproject.org/

     

    python-networking-mlnx deb is available in Ubuntu  repositories:

    Note: version 2015.1 is liberty and version :8.0.0 is mitaka.

     

    Configuration

    Add the SDN mandatory configuration of the SDN provider in /etc/neutron/plugins/ml2/ml2_conf.ini

    [sdn]

    url = http://<neo ip address>/neo

    username = admin
    password = admin
    domain = cloudx

     

     

    [ml2]

    #For Mitaka and older releases

    mechanism_drivers = sdnmechdriver,openvswitch,sriovnicswitch

    #For Newton and later releases

    mechanism_drivers = mlnx_sdn_assist,openvswitch,sriovnicswitch

     

    Notes:

    • As a part of the mechanism_drivers, the sdnmechdriver should be the first in line.
    • From Newton release, the mechanism driver changes from sdnmechdriver to mlnx_sdn_assist.
    • From Newton release, a new sync mechanism will be introduced between mlnx_sdn_assist and NEO.

     

    Verification

    1. Create a network via the OpenStack CLI or GUI.

    2. Check the Neutron log file to verify that an HTTP POST operation is sent to the SDN provider.

     

    Example of successful POST of network creation:

    015-04-29 10:29:10.924 DEBUG networking_mlnx.plugins.ml2.drivers.sdn.sdn_mech_driver [req-dfb8beb4-2ac1-4023-bbf9-e164146df4ba admin admin] Sending METHOD POST URL httphttp://10.209.24.127/neo/cloudx/Network JSON {

      "status": "ACTIVE",

      "subnets": [],

      "provider:physical_network": "physnet1",

      "mtu": 0,

      "id": "9921c09f-b2f6-4164-916f-ad32d88f8530",

      "provider:segmentation_id": 2,

      "router:external": false,

      "name": "private",

      "admin_state_up": true,

      "tenant_id": "972f9da4e3444167972d8af5a8c40279",

      "provider:network_type": "vlan",

      "vlan_transparent": null,

      "shared": false

      } _send_json_http_request /opt/stack/neutron_ml2_mlnx/networking_mlnx/plugins/ml2/drivers/sdn/sdn_mech_driver.py:221

    2015-04-29 10:29:10.936 INFO neutron.wsgi [req-dfb8beb4-2ac1-4023-bbf9-e164146df4ba admin admin] 10.209.24.126 - - [29/Apr/2015 10:29:10] "POST /v2.0/networks.json HTTP/1.1" 201 539 0.431858

     

    Note: The VLAN number that was selected in this case was the segmentation_id number.