Score:0

openstack selfservice network error Invalid input for operation: Segmentation ID should be lower or equal to 4095

us flag

I am running ubuntu 22.04 lts with openstack yoga. when i run the following command openstack network create selfservice --debug i get error

POST call to network for http://controller1:9696/v2.0/networks used request id req-286cd601-99e7-4f1e-999f-a99110123e0f
Error while executing command: BadRequestException: 400, Invalid input for operation: Segmentation ID should be lower or equal to 4095.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/openstackclient/network/common.py", line 249, in take_action
    return self.take_action_network(
  File "/usr/lib/python3/dist-packages/openstackclient/network/v2/network.py", line 340, in take_action_network
    obj = client.create_network(**attrs)
  File "/usr/lib/python3/dist-packages/openstack/network/v2/_proxy.py", line 1726, in create_network
    return self._create(_network.Network, **attrs)
  File "/usr/lib/python3/dist-packages/openstack/proxy.py", line 463, in _create
    return res.create(self, base_path=base_path)
  File "/usr/lib/python3/dist-packages/openstack/resource.py", line 1364, in create
    self._translate_response(response, has_body=has_body)
  File "/usr/lib/python3/dist-packages/openstack/resource.py", line 1177, in _translate_response
    exceptions.raise_from_response(response, error_message=error_message)
  File "/usr/lib/python3/dist-packages/openstack/exceptions.py", line 236, in raise_from_response
    raise cls(
openstack.exceptions.BadRequestException: BadRequestException: 400: Client Error for url: http://controller1:9696/v2.0/networks, Invalid input for operation: Segmentation ID should be lower or equal to 4095.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cliff/app.py", line 407, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python3/dist-packages/osc_lib/command/command.py", line 39, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3/dist-packages/cliff/display.py", line 115, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python3/dist-packages/openstackclient/network/common.py", line 258, in take_action
    raise exceptions.CommandError(msg)
osc_lib.exceptions.CommandError: Error while executing command: BadRequestException: 400, Invalid input for operation: Segmentation ID should be lower or equal to 4095.
clean_up CreateNetwork: Error while executing command: BadRequestException: 400, Invalid input for operation: Segmentation ID should be lower or equal to 4095.
END return value: 1

I do not know where you specify this segment id

I have provider network : 192.168.122.0/24 management network: 10.0.0.0/24

$ sudo egrep -v '^#|^$' /etc/neutron/plugins/ml2/ml2_conf.ini
[DEFAULT]
[ml2]
type_drivers = local,flat,vlan,geneve
tenant_network_types = geneve
mechanism_drivers = ovn
extension_drivers = port_security
overlay_ip_version = 4
[ml2_type_flat]
flat_networks = provider
[ml2_type_geneve]
vni_ranges = 1:65536
max_header_size = 38
[ml2_type_gre]
[ml2_type_vlan]
network_vlan_ranges = enp1s0,enp7s0:1001:2000
[ml2_type_vxlan]
vni_ranges = 1:1000
[ovs_driver]
[securitygroup]
enable_security_group = true
enable_ipset = true
[sriov_driver]
[ovn]
ovn_nb_connection = tcp:192.168.122.124:6641
ovn_sb_connection = tcp:192.168.122.124:6642
ovn_l3_scheduler = leastloaded



#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"}
us flag
I'm wondering about this line: `network_vlan_ranges = enp1s0,enp7s0:1001:2000`. You don't specify a range for `enp1s0`, only for `enp7s0`, is that intentionally? I'm not sure how to specify multiple NICs but not all with ranges.
shorif2000 avatar
us flag
I copied that from the docs and just put my interface name. if its not correct i'm not sure how it is meant to be https://docs.openstack.org/neutron/xena/install/ovn/manual_install.html
us flag
I see. And if you limit the ranges for the first interface as well? Is the error still present?
shorif2000 avatar
us flag
Yes. i changed it to `enp1s0:1001:2000,enp7s0:1001:2000` and restarted `neutron-server`. still same error. i tried without a range as well - same error
Score:0
us flag

The openstack documentation is not clear on this page https://docs.openstack.org/neutron/yoga/install/ovn/manual_install.html

In file /etc/neutron/plugins/ml2/ml2_conf.ini under ml2_type_geneve it should be vni_ranges = 1:4000

us flag
The note in that section says that the values should match and are not simply interchangeable: The Networking service uses the vni_ranges option to allocate network segments. However, OVN ignores the actual values. Thus, the ID range only determines the quantity of Geneve networks in the environment. For example, a range of 5001:6000 defines a maximum of 1000 Geneve networks. On the other hand, these values are still relevant in Neutron context so 1:1000 and 5001:6000 are not simply interchangeable.
shorif2000 avatar
us flag
I don't understand. are you saying this is wrong? `vni_ranges = 1:4000`. How do I make it correct?
us flag
What I meant was that your statement (the documentation is not correct) is not true, the docs just contain examples, you need to figure out your actual config settings. Anyway, if the current settings work for you, don't change them.
shorif2000 avatar
us flag
@eblock It seems like i have done something weird https://bugs.launchpad.net/neutron/+bug/1997955
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.