neutron_lib.exceptions.InvalidInput: Invalid input for operation: Segmentation ID should be lower or equal to 4095

Bug #1997955 reported by sharif uddin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Undecided
Unassigned

Bug Description

I am using ubuntu 22.04 lts with openstack yoga. I have followed the docs and trying a basic selfservice option. I am not that familiar with ovn and hoping to get everything working using the docs in openstack

$ openstack network agent list
+--------------------------------------+------------------------------+-------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+------------------------------+-------------+-------------------+-------+-------+---------------------------+
| 2c5f8c3d-0929-483f-ad2e-f205a13542b6 | Linux bridge agent | compute1 | None | :-) | UP | neutron-linuxbridge-agent |
| 4833fd16-e2b3-4310-9519-77eb2e99bf52 | DHCP agent | controller1 | nova | :-) | UP | neutron-dhcp-agent |
| 4909e7f0-171b-4943-9655-c623a50f0272 | Linux bridge agent | controller1 | None | :-) | UP | neutron-linuxbridge-agent |
| 7e04f3df-c463-4462-bacc-0fd926d6f94e | Open vSwitch agent | controller1 | None | XXX | UP | neutron-openvswitch-agent |
| d646ace9-8ba4-4e78-91ca-5d0af703c846 | Metadata agent | controller1 | None | :-) | UP | neutron-metadata-agent |
| bbb33d2c-733b-4647-950d-967d16c647bb | OVN Controller agent | compute1 | | XXX | UP | ovn-controller |
| e8cc2321-e5f9-47be-8969-1b4f4f43830f | OVN Controller Gateway agent | controller1 | | XXX | UP | ovn-controller |

after ovn install verify:

sudo ovn-sbctl show
Chassis "bbb33d2c-733b-4647-950d-967d16c647bb"
    hostname: compute1
    Encap vxlan
        ip: "192.168.122.16"
        options: {csum="true"}
    Encap geneve
        ip: "192.168.122.16"
        options: {csum="true"}
Chassis "e8cc2321-e5f9-47be-8969-1b4f4f43830f"
    hostname: controller1
    Encap geneve
        ip: "10.0.0.154"
        options: {csum="true"}

I am trying to go through this https://docs.openstack.org/install-guide/launch-instance-networks-selfservice.html

but it does not create the network

https://paste.opendev.org/show/bKspWZBsAI7EcPXL4Yld/

Revision history for this message
Lajos Katona (lajos-katona) wrote :

Hi,
Perhaps first thing: your setup looks strange, you have linuxbridge agent and OVN also, some fixing there is necessary I am sure (OVN controller is Alive state is also strange.

The exception which you receive back is from OVN mech driver (see [1]), and as I see the max_tun_id here is coming from OVN global settings.
So you have to check your OVN settings to see why this max_tunid is set to 4095, and from the other perspcetive if this value is set for some reason why you try to use larger segmentation id than that?

[1]: https://opendev.org/openstack/neutron/src/branch/master/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py#L495-L516

Changed in neutron:
status: New → Incomplete
Revision history for this message
sharif uddin (shorif2000) wrote :

I followed the guide to install networking option 2. how do i turn off linuxbridge agent? or don't I need OVN? it is not clear

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello Sharif:

Can you share the document you followed to make this deployment?

ML2/OVN is not supposed to work with ML2/Linux Bridge, so as Lajos suggested, you should remove the Linux Bridge agents. You can stop the services and delete the agent references.

About the segmentation ID issue. When using ML2/OVN, there is a limitation for VXLAN networks described in [1]. Because of the limited VXLAN NVI space, it leaves only 12 bits to define the segmentation ID. The NB_Global options:max_tunid defines the maximumn capacity for LS supported by the setup.

I'm marking this bug as invalid because the issue is a known limitation.

Regards.

[1]https://mail.openvswitch.org/pipermail/ovs-dev/2020-September/375189.html

Changed in neutron:
status: Incomplete → Invalid
Revision history for this message
sharif uddin (shorif2000) wrote :

Hello

I have followed this page https://docs.openstack.org/neutron/yoga/install/ "Install and configure for Ubuntu" and then I assumed the next step is "OVN Install Documentation" which then I chose https://docs.openstack.org/neutron/yoga/install/ovn/manual_install.html

some of the extra/modified steps i had to do for OVN

### ovn

## run on controller
apt install openvswitch-switch ovn-host ovn-docker ovn-common

sudo /usr/share/ovn/scripts/ovn-ctl start_ovsdb
sudo /usr/share/ovn/scripts/ovn-ctl start_northd
sudo /usr/share/ovn/scripts/ovn-ctl start_nb_ovsdb
sudo /usr/share/ovn/scripts/ovn-ctl start_sb_ovsdb
sudo /usr/share/ovn/scripts/ovn-ctl start_controller

#systemctl restart openvswitch-switch
/usr/share/openvswitch/scripts/ovs-ctl restart --system-id="random"

ovn-nbctl -v set-connection ptcp:6641:0.0.0.0 -- set connection . inactivity_probe=60000
ovn-sbctl -v set-connection ptcp:6642:0.0.0.0 -- set connection . inactivity_probe=60000
ovs-appctl -t ovsdb-server ovsdb-server/add-remote ptcp:6640:0.0.0.0

sudo /usr/share/ovn/scripts/ovn-ctl start_ovsdb
sudo /usr/share/ovn/scripts/ovn-ctl start_northd
sudo /usr/share/ovn/scripts/ovn-ctl start_nb_ovsdb
sudo /usr/share/ovn/scripts/ovn-ctl start_sb_ovsdb
sudo /usr/share/ovn/scripts/ovn-ctl restart_controller
ovs-vsctl set open . external-ids:ovn-cms-options=enable-chassis-as-gw

systemctl restart ovn-northd
service neutron-server restart

## run on compute
# bug https://bugs.launchpad.net/devstack/+bug/1812398
apt install openvswitch*
systemctl restart openvswitch-switch
sudo /usr/share/ovn/scripts/ovn-ctl start_ovsdb
ovs-vsctl set open . external-ids:ovn-remote=tcp:192.168.122.124:6642
ovs-vsctl set open . external-ids:ovn-encap-type=geneve,vxlan
ovs-vsctl set open . external-ids:ovn-encap-ip=192.168.122.16
systemctl start ovn-controller

Revision history for this message
sharif uddin (shorif2000) wrote :
Revision history for this message
sharif uddin (shorif2000) wrote :

I did this through trial and error
In file /etc/neutron/plugins/ml2/ml2_conf.ini under ml2_type_geneve it should be vni_ranges = 1:4000

and I managed to run `openstack network create selfservice` but I am told this is not correct https://serverfault.com/questions/1116584/openstack-selfservice-network-error-invalid-input-for-operation-segmentation-id/1116772?noredirect=1#comment1458473_1116772

My next step I had to modify the command also was not clear

#replace router and provider with id's
#openstack router set router --external-gateway provider
openstack subnet create --network selfservice \
  --dns-nameserver 8.8.4.4 --gateway 172.16.1.1 \
  --subnet-range 172.16.1.0/24 selfservice

When I try to verify i only get 1 entry

$ ip netns
qdhcp-d63e1058-a726-4758-9cdf-266afe2d9ac9 (id: 0)

Revision history for this message
sharif uddin (shorif2000) wrote :

it is this command I had to modify

openstack router set 4198ba63-945e-42b1-b4eb-384ffa2288c2 --external-gateway d63e1058-a726-4758-9cdf-266afe2d9ac9 --debug

Revision history for this message
sharif uddin (shorif2000) wrote :

@rodolfo-alonso-hernandez Can you tell me which services to stop?

`neutron-plugin-ml2 \
  neutron-linuxbridge-agent neutron-l3-agent neutron-dhcp-agent \
  neutron-metadata-agent`

I have stopped neutron-linuxbridge-agent on controller1 an compute1 but have noticed errors now

on compute1 https://paste.opendev.org/show/blJW7dFruJMi1uv2krAj/

Revision history for this message
Lajos Katona (lajos-katona) wrote :

Hi, nova-compute log is not related to stopping Neutron agents. If you stopped neutron-linuxbridge-agent you chose well, be sure that you deleted the agent also (not just stopped the service with systemctl for example, but remove the agent from the agent list:
$ openstack network agent list
....
$ openstack network agent delete <uuid of linuxbridge agent>

)

Revision history for this message
sharif uddin (shorif2000) wrote :

Hi, I have removed it now. Would I have to update/undo any configurations in any files?

this is what I have now

$ openstack network agent list
+--------------------------------------+------------------------------+-------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+------------------------------+-------------+-------------------+-------+-------+---------------------------+
| 4833fd16-e2b3-4310-9519-77eb2e99bf52 | DHCP agent | controller1 | nova | XXX | UP | neutron-dhcp-agent |
| 7e04f3df-c463-4462-bacc-0fd926d6f94e | Open vSwitch agent | controller1 | None | XXX | UP | neutron-openvswitch-agent |
| d646ace9-8ba4-4e78-91ca-5d0af703c846 | Metadata agent | controller1 | None | :-) | UP | neutron-metadata-agent |
| bbb33d2c-733b-4647-950d-967d16c647bb | OVN Controller agent | compute1 | | XXX | UP | ovn-controller |
| e8cc2321-e5f9-47be-8969-1b4f4f43830f | OVN Controller Gateway agent | controller1 | | XXX | UP | ovn-controller |
+--------------------------------------+------------------------------+-------------+-------------------+-------+-------+---------------------------+

I restarted everything, just in case

sudo service nova-api restart
sudo service neutron-server restart
sudo service neutron-dhcp-agent restart
sudo service neutron-metadata-agent restart
sudo service neutron-l3-agent restart

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.