[Yahoo-eng-team] [Bug 1896933] [NEW] Exception when plugin creates a network without specifying the MTU

2020-09-24 Thread Thomas Bachman
Public bug reported:

This was found as a UT regression failure in the x/group-based-policy
project, but I think the same issue applies to the auto-allocated-
topology workflow (or any feature that creates a network at the plugin
or DB layer instead of at the REST layer). The exception seen is this:

  File 
"/home/zuul/src/opendev.org/x/group-based-policy/.tox/py36/lib/python3.6/site-packages/neutron/plugins/ml2/plugin.py",
 line 1053, in create_network
result, mech_context = self._create_network_db(context, network)
  File 
"/home/zuul/src/opendev.org/x/group-based-policy/gbpservice/neutron/plugins/ml2plus/plugin.py",
 line 333, in _create_network_db
context, network)
  File 
"/home/zuul/src/opendev.org/x/group-based-policy/.tox/py36/lib/python3.6/site-packages/neutron/plugins/ml2/plugin.py",
 line 1013, in _create_network_db
net_db.mtu = self._get_network_mtu(net_db)
  File 
"/home/zuul/src/opendev.org/x/group-based-policy/.tox/py36/lib/python3.6/site-packages/neutron/plugins/ml2/plugin.py",
 line 995, in _get_network_mtu
raise exc.InvalidInput(error_message=msg)
neutron_lib.exceptions.InvalidInput: Invalid input for operation: Requested MTU 
is too big, maximum is 1000.

The UT limits the network MTU using configuration file settings:
https://opendev.org/x/group-based-policy/src/branch/master/gbpservice/neutron/tests/unit/services/grouppolicy/test_aim_mapping_driver.py#L2951-L2952

The regression happens because a default MTU for the DB layer was
introduced in this patch: https://review.opendev.org/#/c/679399/

The default value used is the DEFAULT_NETWORK_MTU constant from neutron-
lib (1500). This is different than the default value installed by the
REST layer (0). When the network MTU is constrained using configuration
files, it gets to this code path:

https://opendev.org/openstack/neutron/src/branch/master/neutron/plugins/ml2/plugin.py#L992-L1002

Since the DB layer has set the default to 1500 instead of 0, this
exception gets triggered, even though the caller at the plugin layer
didn't specify a value for the MTU.

One possible fix is to have the DB layer use a value of 0 for the
default instead of DEFAULT_NETWORK_MTU.

** Affects: neutron
     Importance: Undecided
 Assignee: Thomas Bachman (bachman)
 Status: In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1896933

Title:
  Exception when plugin creates a network without specifying the MTU

Status in neutron:
  In Progress

Bug description:
  This was found as a UT regression failure in the x/group-based-policy
  project, but I think the same issue applies to the auto-allocated-
  topology workflow (or any feature that creates a network at the plugin
  or DB layer instead of at the REST layer). The exception seen is this:

File 
"/home/zuul/src/opendev.org/x/group-based-policy/.tox/py36/lib/python3.6/site-packages/neutron/plugins/ml2/plugin.py",
 line 1053, in create_network
  result, mech_context = self._create_network_db(context, network)
File 
"/home/zuul/src/opendev.org/x/group-based-policy/gbpservice/neutron/plugins/ml2plus/plugin.py",
 line 333, in _create_network_db
  context, network)
File 
"/home/zuul/src/opendev.org/x/group-based-policy/.tox/py36/lib/python3.6/site-packages/neutron/plugins/ml2/plugin.py",
 line 1013, in _create_network_db
  net_db.mtu = self._get_network_mtu(net_db)
File 
"/home/zuul/src/opendev.org/x/group-based-policy/.tox/py36/lib/python3.6/site-packages/neutron/plugins/ml2/plugin.py",
 line 995, in _get_network_mtu
  raise exc.InvalidInput(error_message=msg)
  neutron_lib.exceptions.InvalidInput: Invalid input for operation: Requested 
MTU is too big, maximum is 1000.

  The UT limits the network MTU using configuration file settings:
  
https://opendev.org/x/group-based-policy/src/branch/master/gbpservice/neutron/tests/unit/services/grouppolicy/test_aim_mapping_driver.py#L2951-L2952

  The regression happens because a default MTU for the DB layer was
  introduced in this patch: https://review.opendev.org/#/c/679399/

  The default value used is the DEFAULT_NETWORK_MTU constant from
  neutron-lib (1500). This is different than the default value installed
  by the REST layer (0). When the network MTU is constrained using
  configuration files, it gets to this code path:

  
https://opendev.org/openstack/neutron/src/branch/master/neutron/plugins/ml2/plugin.py#L992-L1002

  Since the DB layer has set the default to 1500 instead of 0, this
  exception gets triggered, even though the caller at the plugin layer
  didn't specify a value for the MTU.

  One possible fix is to have the DB layer use a value of 0 for the
  default instead of DEFAULT_NETWORK_MTU.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1896933/+

[Yahoo-eng-team] [Bug 1552786] [NEW] VMware: Port Group and Port ID not explicit from port binding

2016-03-03 Thread Thomas Bachman
Public bug reported:

Various Neutron core plugins and/or ML2 mechanism drivers that support
VMware vCenter as a Nova compute backend have different ways to map
Neutron resources to vCenter constructs. The vCenter VIF driver code in
Nova currently assumes a particular mapping. The Neutron plugin or
driver should be able to use the port's binding:vif_details attribute to
explicitly specify the vCenter port key and port group to be used for
the VIF.

** Affects: nova
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1552786

Title:
  VMware: Port Group and Port ID not explicit from port binding

Status in OpenStack Compute (nova):
  New

Bug description:
  Various Neutron core plugins and/or ML2 mechanism drivers that support
  VMware vCenter as a Nova compute backend have different ways to map
  Neutron resources to vCenter constructs. The vCenter VIF driver code
  in Nova currently assumes a particular mapping. The Neutron plugin or
  driver should be able to use the port's binding:vif_details attribute
  to explicitly specify the vCenter port key and port group to be used
  for the VIF.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1552786/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp