L3 agent config option to pass provider:physical_network while creating HA network

Bug #1727262 reported by venkata anil
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
New
Undecided
Unassigned

Bug Description

In a customer environment, they are using sriov and openvswitch like below
mechanism_drivers = openvswitch,sriovnicswitch
[ml2_type_vlan]
network_vlan_ranges=ovs:1300:1500,sriov:1300:1500
but sriov is enabled only on compute nodes and openvswitch on controllers.
When first HA router is created on a tenant, l3 agent is creating new HA tenant network with segmentation_id from ovs driver.
But when no more vlan ids available on ovs, it is picking up segmentation_id from sriov for later HA tenant networks.
As ovs agent in controllers only supporting ovs and not sriov, binding for HA router network port(i.e device_owner as router_ha_interface) is failing.
As HA network creation and HA router creation was succeful, but keepalived was not spawned, confusing admins why it was not spawned.

So we need to enhance l3 agent to pass "provider:physical_network" while creating HA network.
In this case, if l3 agent was able to pass provider:physical_network=ovs, and if no free vlan id's available, then both HA network and HA router creat
ion will fail and admin can debug the failure easily.

Binding failure errors

2017-10-24 04:47:04.835 411054 DEBUG neutron.plugins.ml2.drivers.mech_sriov.mech_driver.mech_driver [req-c50a05a9-d889-4abc-a267-dc3098ad854c - - - - -] Attempting to bind port 95f5d893-3490-410b-8c3e-cd82e4831f34 on network d439f80d-ce31-496b-b048-a1056ed3f8b7 bind_port /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/mech_sriov/mech_driver/mech_driver.py:111
2017-10-24 04:47:04.836 411054 DEBUG neutron.plugins.ml2.drivers.mech_sriov.mech_driver.mech_driver [req-c50a05a9-d889-4abc-a267-dc3098ad854c - - - - -] Refusing to bind due to unsupported vnic_type: normal bind_port /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/mech_sriov/mech_driver/mech_driver.py:116
2017-10-24 04:47:04.836 411054 ERROR neutron.plugins.ml2.managers [req-c50a05a9-d889-4abc-a267-dc3098ad854c - - - - -] Failed to bind port 95f5d893-3490-410b-8c3e-cd82e4831f34 on host corea-controller0.mtcelab.com for vnic_type normal using segments [{'segmentation_id': 1321, 'physical_network': u'sriov_a', 'id': u'1ec5240e-84c1-4fad-b9ff-a40cea8ec14e', 'network_type': u'vlan'}]

[stack@txwlvcpdirector04 ~]$ neutron net-show d439f80d-ce31-496b-b048-a1056ed3f8b7
+---------------------------+----------------------------------------------------+
| Field | Value |
+---------------------------+----------------------------------------------------+
| admin_state_up | True |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2017-10-17T22:17:29Z |
| description | |
| id | d439f80d-ce31-496b-b048-a1056ed3f8b7 |
| ipv4_address_scope | |
| ipv6_address_scope | |
| mtu | 9200 |
| name | HA network tenant ca7ceaf971014d01992b455119ca5990 |
| port_security_enabled | True |
| project_id | |
| provider:network_type | vlan |
| provider:physical_network | sriov_a |
| provider:segmentation_id | 1321 |
| qos_policy_id | |
| revision_number | 5 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | 4bdaed16-43c7-4b5e-acf2-0e9e55f44304 |
| tags | |
| tenant_id | |
| updated_at | 2017-10-17T22:17:29Z |
+---------------------------+----------------------------------------------------+

Tags: l3-ha
tags: added: l3-ha
Revision history for this message
venkata anil (anil-venkata) wrote :

I want to introduce new l3 agent config options, like
HA_NETWORK_PROVIDER_NETWORK_TYPE=vlan
HA_NETWORK_PROVIDER_PHYSICAL_NETWORK=ovs

then while creating HA network, l3 agent will pass them like below, at [1]

        args = {'network':
                {'name': n_const.HA_NETWORK_NAME % tenant_id,
                 'tenant_id': '',
                 'shared': False,
                 'admin_state_up': True}}

        if conf.HA_NETWORK_PROVIDER_NETWORK_TYPE and conf.HA_NETWORK_PROVIDER_PHYSICAL_NETWORK:
            args['provider:network_type'] = conf.HA_NETWORK_PROVIDER_NETWORK_TYPE
            args['provider:physical_network'] = conf.HA_NETWORK_PROVIDER_PHYSICAL_NETWORK

        self._add_ha_network_settings(args['network'])
        creation = functools.partial(p_utils.create_network,
                                     self._core_plugin, admin_ctx, args)

[1] https://github.com/openstack/neutron/blob/master/neutron/db/l3_hamode_db.py#L224

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.