MTU too large error presented on create but not update

Bug #1867214 reported by Nate Johnston
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
In Progress
Medium
Nate Johnston

Bug Description

If an MTU is supplied when creating a network it is rejected if it is above global_physnet_mtu. If an MTU is supplied when updating a network it is not rejected even if the value is too large. When global_physnet_mtu is 1500 I can easily set MTU 9000 or even beyond through update. This is not valid.

~~~
w(overcloud) [stack@undercloud-0 ~]$ openstack network show private1
+---------------------------+----------------------------------------------------------------------------+
| Field | Value |
+---------------------------+----------------------------------------------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | nova |
| created_at | 2020-03-09T15:55:38Z |
| description | |
| dns_domain | None |
| id | bffac18a-ceaa-4eeb-9a19-800de150def5 |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | False |
| is_vlan_transparent | None |
| mtu | 1500 |
| name | private1 |
| port_security_enabled | True |
| project_id | d69c1c6601c741deaa205fa1a7e9c632 |
| provider:network_type | vlan |
| provider:physical_network | tenant |
| provider:segmentation_id | 106 |
| qos_policy_id | None |
| revision_number | 8 |
| router:external | External |
| segments | None |
| shared | True |
| status | ACTIVE |
| subnets | 51fc6508-313f-41c4-839c-bcbe2fa8795d, 7b6fcbe1-b064-4660-b04a-e433ab18ba73 |
| tags | |
| updated_at | 2020-03-09T15:56:41Z |
+---------------------------+----------------------------------------------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ openstack network set private1 --mtu 9000
(overcloud) [stack@undercloud-0 ~]$ openstack network set private1 --mtu 9500
(overcloud) [stack@undercloud-0 ~]$ openstack network show private1

+---------------------------+----------------------------------------------------------------------------+
| Field | Value |
+---------------------------+----------------------------------------------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | nova |
| created_at | 2020-03-09T15:55:38Z |
| description | |
| dns_domain | None |
| id | bffac18a-ceaa-4eeb-9a19-800de150def5 |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | False |
| is_vlan_transparent | None |
| mtu | 9500 |
| name | private1 |
| port_security_enabled | True |
| project_id | d69c1c6601c741deaa205fa1a7e9c632 |
| provider:network_type | vlan |
| provider:physical_network | tenant |
| provider:segmentation_id | 106 |
| qos_policy_id | None |
| revision_number | 12 |
| router:external | External |
| segments | None |
| shared | True |
| status | ACTIVE |
| subnets | 51fc6508-313f-41c4-839c-bcbe2fa8795d, 7b6fcbe1-b064-4660-b04a-e433ab18ba73 |
| tags | |
| updated_at | 2020-03-10T15:16:15Z |
+---------------------------+----------------------------------------------------------------------------+
~~~

Here we demonstrate that while network set works, network create does not. Network create seems to have the correct behavior.

--------------------

~~~
overcloud) [stack@undercloud-0 ~]$ openstack network create --mtu 1500 --provider-physical-network tenant --provider-network-type vlan --provider-segment 109 private10
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2020-03-10T15:20:15Z |
| description | |
| dns_domain | None |
| id | f8b6efda-3c77-4ac0-a4dd-13773cf3f542 |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | False |
| is_vlan_transparent | None |
| mtu | 1500 |
| name | private10 |
| port_security_enabled | True |
| project_id | d69c1c6601c741deaa205fa1a7e9c632 |
| provider:network_type | vlan |
| provider:physical_network | tenant |
| provider:segmentation_id | 109 |
| qos_policy_id | None |
| revision_number | 3 |
| router:external | Internal |
| segments | None |
| shared | False |
| status | ACTIVE |
| subnets | |
| tags | |
| updated_at | 2020-03-10T15:20:15Z |
+---------------------------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ openstack network delete private10
~~~

~~~
(overcloud) [stack@undercloud-0 ~]$ openstack network create --mtu 2500 --provider-physical-network tenant --provider-network-type vlan --provider-segment 109 private10
Error while executing command: BadRequestException: Unknown error, {"NeutronError": {"message": "Invalid input for operation: Requested MTU is too big, maximum is 1500.", "type": "InvalidInput", "detail": ""}}
~~~

~~~
(overcloud) [stack@undercloud-0 ~]$ openstack network create --mtu 1500 --provider-physical-network tenant --provider-network-type vlan --provider-segment 109 private10
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2020-03-10T15:20:50Z |
| description | |
| dns_domain | None |
| id | fb8e96b4-b770-4493-a6ee-3cdae5dbf714 |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | False |
| is_vlan_transparent | None |
| mtu | 1500 |
| name | private10 |
| port_security_enabled | True |
| project_id | d69c1c6601c741deaa205fa1a7e9c632 |
| provider:network_type | vlan |
| provider:physical_network | tenant |
| provider:segmentation_id | 109 |
| qos_policy_id | None |
| revision_number | 3 |
| router:external | Internal |
| segments | None |
| shared | False |
| status | ACTIVE |
| subnets | |
| tags | |
| updated_at | 2020-03-10T15:20:50Z |
+---------------------------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ openstack network set private10 --mtu 2500
(overcloud) [stack@undercloud-0 ~]$ openstack network show private10
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2020-03-10T15:20:50Z |
| description | |
| dns_domain | None |
| id | fb8e96b4-b770-4493-a6ee-3cdae5dbf714 |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | None |
| is_vlan_transparent | None |
| mtu | 2500 |
| name | private10 |
| port_security_enabled | True |
| project_id | d69c1c6601c741deaa205fa1a7e9c632 |
| provider:network_type | vlan |
| provider:physical_network | tenant |
| provider:segmentation_id | 109 |
| qos_policy_id | None |
| revision_number | 5 |
| router:external | Internal |
| segments | None |
| shared | False |
| status | ACTIVE |
| subnets | |
| tags | |
| updated_at | 2020-03-10T15:21:08Z |
+---------------------------+--------------------------------------+

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/712801

Changed in neutron:
assignee: nobody → Nate Johnston (nate-johnston)
status: New → In Progress
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Slawek Kaplonski (<email address hidden>) on branch: master
Review: https://review.opendev.org/712801
Reason: This review is > 4 weeks without comment, and failed Zuul jobs the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

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.