"ml2_vlan_allocations.vlan_id" value should be checked in the DB backend

Bug #1870400 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Rodolfo Alonso

Bug Description

As reported by some users [1], the Neutron table "ml2_vlan_allocations" contains allocations with vlan_id=0.

A VLAN ID with value 0 is not accepted by Neutron during the parsing of config option "network_vlan_ranges". "NetworkVlanRangeError" exception is raised.

Despite of this check, the DB, somehow, has a register with vlan_id=0:

> select * from ml2_vlan_allocations;
+------------------+---------+-----------+
| physical_network | vlan_id | allocated |
+------------------+---------+-----------+
| tenant ......... | ..... 0 | ....... 1 |
...

A DB backend check should disable any writing operation with vlan_id out of the allowed VLAN tags [1, 4094]

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1716857

description: updated
description: updated
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/717083

Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
status: New → In Progress
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/717083
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=795aa6b9fa792ec31c211cb690cae905c067dcf5
Submitter: Zuul
Branch: master

commit 795aa6b9fa792ec31c211cb690cae905c067dcf5
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Apr 28 09:07:07 2020 +0000

    Limit ml2_vlan_allocations.vlan_id value in DB backend

    Limit "ml2_vlan_allocations.vlan_id" values stored in the DB by
    adding a check constraint in the DB engine. This check will
    verify that vlan_id is in the interval [1, 4094].

    Change-Id: Ie6453cb7a2ef0c43baf540c49a03079f4c8d3818
    Closes-Bug: #1870400

Changed in neutron:
status: In Progress → Fix Released
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.