0

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"}
shorif2000
  • 351
  • 1
  • 8
  • 28
  • 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. – eblock Nov 25 '22 at 10:25
  • 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 – shorif2000 Nov 25 '22 at 15:57
  • I see. And if you limit the ranges for the first interface as well? Is the error still present? – eblock Nov 25 '22 at 21:18
  • 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 – shorif2000 Nov 28 '22 at 08:34

1 Answers1

0

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

shorif2000
  • 351
  • 1
  • 8
  • 28
  • 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. – eblock Nov 28 '22 at 09:30
  • I don't understand. are you saying this is wrong? `vni_ranges = 1:4000`. How do I make it correct? – shorif2000 Nov 29 '22 at 00:38
  • 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. – eblock Nov 29 '22 at 07:05
  • @eblock It seems like i have done something weird https://bugs.launchpad.net/neutron/+bug/1997955 – shorif2000 Nov 30 '22 at 13:08