我正在运行带有 openstack yoga 的 ubuntu 22.04 lts。当我运行以下命令时openstack network create selfservice --debug
出现错误
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
我不知道你在哪里指定这个段id
我有提供商网络:192.168.122.0/24 管理网络: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"}
答案1
openstack 文档在这个页面上不清楚https://docs.openstack.org/neutron/yoga/install/ovn/manual_install.html
在文件/etc/neutron/plugins/ml2/ml2_conf.ini
下ml2_type_geneve
应该是vni_ranges = 1:4000