← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1871608] [NEW] [OVN] Cannot create metadata port for segmented network

 

Public bug reported:

While following instructions for Routed Provided Networks [1] and using
OVN Neutron raises error during creation on second segment subnet:


==== How to reproduce ===

sudo iniset /etc/neutron/plugins/ml2/ml2_conf.ini  ml2_type_vlan network_vlan_ranges  segment-1:100:102,segment-2:200:202
sudo systemctl restart devstack@q-svc

openstack network create --share --provider-physical-network segment-1 --provider-network-type vlan --provider-segment 100 public-multisegment
openstack network segment set --name segment-1 $(openstack network segment list --network public-multisegment -c ID -f value)
openstack network segment create --physical-network segment-2 --network-type vlan --segment 200 --network public-multisegment segment-2

openstack subnet create --network public-multisegment --network-segment segment-1 --ip-version 4 --subnet-range 172.24.4.0/24 --allocation-pool start=172.24.4.100,end=172.24.4.200 public-multisegment-segment-1-v4
openstack subnet create --network public-multisegment --network-segment segment-2 --ip-version 4 --subnet-range 172.24.6.0/24 --allocation-pool start=172.24.6.100,end=172.24.6.200 public-multisegment-segment-2-v4

EXCEPTION RAISED ON LAST COMMAND:
Apr 08 11:23:35 central neutron-server[10871]: DEBUG neutron_lib.callbacks.manager [None req-e975c78f-bb1d-449d-9517-0a9386733b13 demo admin] Notify callbacks ['neutron.plugins.ml2.plugin.SecurityGroupDbMixin._ensure_default_security_group
_handler--9223372036853431474'] for port, before_update {{(pid=10878) _notify_loop /usr/local/lib/python3.6/dist-packages/neutron_lib/callbacks/manager.py:193}}                                                                               
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers [None req-e975c78f-bb1d-449d-9517-0a9386733b13 demo admin] Mechanism driver 'ovn' failed in create_subnet_postcommit: neutron.services.segments.exceptions.Fi
xedIpsSubnetsNotOnSameSegment: Cannot allocate addresses from different segments.                                                                                                                                                              
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers Traceback (most recent call last):                                                                                                                           
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/plugins/ml2/managers.py", line 477, in _call_on_drivers                                                                
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     getattr(driver.obj, method_name)(context)                                                                                                                
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py", line 441, in create_subnet_postcommit                             
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     context.network.current)                                                                                                                                 
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 2165, in create_subnet                                  
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     if subnet['enable_dhcp']:                                                                                                                                
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 2356, in update_metadata_port                           
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     metadata_port['id'], port)  
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/common/utils.py", line 685, in inner                                                                                   
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     return f(self, context, *args, **kwargs)                                                                                                                 
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/neutron_lib/db/api.py", line 233, in wrapped                                                                  
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     return method(*args, **kwargs)                                                                                                                           
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/neutron_lib/db/api.py", line 139, in wrapped                                                                  
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     setattr(e, '_RETRY_EXCEEDED', True)                                                                                                                      
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 220, in __exit__                                                                
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     self.force_reraise()                                                                                                                                     
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise                                                           
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     six.reraise(self.type_, self.value, self.tb)                                                                                                             
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/six.py", line 703, in reraise                                                                                 
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     raise value                                                                                                                                              
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/neutron_lib/db/api.py", line 135, in wrapped                                                                  
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     return f(*args, **kwargs)                                                                                                                                
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_db/api.py", line 154, in wrapper                                                                         
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     ectxt.value = e.inner_exc                                                                                                                                
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 220, in __exit__                                                                
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     self.force_reraise()                                                                                                                                     
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise                                                           
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     six.reraise(self.type_, self.value, self.tb)                                                                                                             
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/six.py", line 703, in reraise                                                                                 
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     raise value                                                                                                                                              
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_db/api.py", line 142, in wrapper                                                                         
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     return f(*args, **kwargs)                                                                                                                                
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/neutron_lib/db/api.py", line 183, in wrapped                                                                  
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     LOG.debug("Retry wrapper got retriable exception: %s", e)                                                                                                
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 220, in __exit__                                                                
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     self.force_reraise()                                                                                                                                     
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise                                                           
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     six.reraise(self.type_, self.value, self.tb)                                                                                                             
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/six.py", line 703, in reraise                                                                                 Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     raise value                                            
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/neutron_lib/db/api.py", line 179, in wrapped                                                                  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     return f(*dup_args, **dup_kwargs)                    
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/plugins/ml2/plugin.py", line 1652, in update_port                                                                      Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     port)                                
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/neutron_lib/db/api.py", line 233, in wrapped                                                                  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     return method(*args, **kwargs)                      
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/db/db_base_plugin_v2.py", line 1503, in update_port                                                                    Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     new_port=new_port)                              
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/db/ipam_backend_mixin.py", line 703, in update_port                                                                    Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     new_port.get('mac_address'))                                                                                            
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/db/ipam_pluggable_backend.py", line 428, in update_port_with_ips                                                       
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     new_mac)                                                                                                                                                 Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/db/ipam_pluggable_backend.py", line 351, in _update_ips_for_port                                                       
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     fixed_ips=changes.add + changes.original)                                                                                                                Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/db/ipam_backend_mixin.py", line 657, in _ipam_get_subnets                                                              
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     fixed_ips)                                                                                                                                               Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/objects/subnet.py", line 338, in find_candidate_subnets                
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     query, fixed_ips).all()                                                                                                                                  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/objects/subnet.py", line 394, in _query_filter_by_fixed_ips_segment                                          
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     raise segment_exc.FixedIpsSubnetsNotOnSameSegment()                                                                                                      Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers neutron.services.segments.exceptions.FixedIpsSubnetsNotOnSameSegment: Cannot allocate addresses from different segments.    
Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers                 


Client error:
BadRequestException: 400: Client Error for url: http://192.168.121.158:9696/v2.0/subnets, Cannot allocate addresses from different segments.


Looks like we need to fix segment handling for metadata ports [2].


[1] https://docs.openstack.org/ocata/networking-guide/config-routed-networks.html
[2] https://github.com/openstack/neutron/blob/805bd1210e2286c02e59b2462ec6470ec81155b0/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L2127

** Affects: neutron
     Importance: Undecided
         Status: New


** Tags: ovn

** Summary changed:

- [OVN] Cannot create metadata part for segmented network
+ [OVN] Cannot create metadata port for segmented network

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1871608

Title:
  [OVN] Cannot create metadata port for segmented network

Status in neutron:
  New

Bug description:
  While following instructions for Routed Provided Networks [1] and
  using OVN Neutron raises error during creation on second segment
  subnet:


  ==== How to reproduce ===

  sudo iniset /etc/neutron/plugins/ml2/ml2_conf.ini  ml2_type_vlan network_vlan_ranges  segment-1:100:102,segment-2:200:202
  sudo systemctl restart devstack@q-svc

  openstack network create --share --provider-physical-network segment-1 --provider-network-type vlan --provider-segment 100 public-multisegment
  openstack network segment set --name segment-1 $(openstack network segment list --network public-multisegment -c ID -f value)
  openstack network segment create --physical-network segment-2 --network-type vlan --segment 200 --network public-multisegment segment-2

  openstack subnet create --network public-multisegment --network-segment segment-1 --ip-version 4 --subnet-range 172.24.4.0/24 --allocation-pool start=172.24.4.100,end=172.24.4.200 public-multisegment-segment-1-v4
  openstack subnet create --network public-multisegment --network-segment segment-2 --ip-version 4 --subnet-range 172.24.6.0/24 --allocation-pool start=172.24.6.100,end=172.24.6.200 public-multisegment-segment-2-v4

  EXCEPTION RAISED ON LAST COMMAND:
  Apr 08 11:23:35 central neutron-server[10871]: DEBUG neutron_lib.callbacks.manager [None req-e975c78f-bb1d-449d-9517-0a9386733b13 demo admin] Notify callbacks ['neutron.plugins.ml2.plugin.SecurityGroupDbMixin._ensure_default_security_group
  _handler--9223372036853431474'] for port, before_update {{(pid=10878) _notify_loop /usr/local/lib/python3.6/dist-packages/neutron_lib/callbacks/manager.py:193}}                                                                               
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers [None req-e975c78f-bb1d-449d-9517-0a9386733b13 demo admin] Mechanism driver 'ovn' failed in create_subnet_postcommit: neutron.services.segments.exceptions.Fi
  xedIpsSubnetsNotOnSameSegment: Cannot allocate addresses from different segments.                                                                                                                                                              
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers Traceback (most recent call last):                                                                                                                           
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/plugins/ml2/managers.py", line 477, in _call_on_drivers                                                                
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     getattr(driver.obj, method_name)(context)                                                                                                                
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py", line 441, in create_subnet_postcommit                             
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     context.network.current)                                                                                                                                 
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 2165, in create_subnet                                  
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     if subnet['enable_dhcp']:                                                                                                                                
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 2356, in update_metadata_port                           
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     metadata_port['id'], port)  
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/common/utils.py", line 685, in inner                                                                                   
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     return f(self, context, *args, **kwargs)                                                                                                                 
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/neutron_lib/db/api.py", line 233, in wrapped                                                                  
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     return method(*args, **kwargs)                                                                                                                           
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/neutron_lib/db/api.py", line 139, in wrapped                                                                  
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     setattr(e, '_RETRY_EXCEEDED', True)                                                                                                                      
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 220, in __exit__                                                                
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     self.force_reraise()                                                                                                                                     
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise                                                           
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     six.reraise(self.type_, self.value, self.tb)                                                                                                             
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/six.py", line 703, in reraise                                                                                 
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     raise value                                                                                                                                              
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/neutron_lib/db/api.py", line 135, in wrapped                                                                  
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     return f(*args, **kwargs)                                                                                                                                
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_db/api.py", line 154, in wrapper                                                                         
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     ectxt.value = e.inner_exc                                                                                                                                
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 220, in __exit__                                                                
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     self.force_reraise()                                                                                                                                     
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise                                                           
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     six.reraise(self.type_, self.value, self.tb)                                                                                                             
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/six.py", line 703, in reraise                                                                                 
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     raise value                                                                                                                                              
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_db/api.py", line 142, in wrapper                                                                         
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     return f(*args, **kwargs)                                                                                                                                
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/neutron_lib/db/api.py", line 183, in wrapped                                                                  
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     LOG.debug("Retry wrapper got retriable exception: %s", e)                                                                                                
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 220, in __exit__                                                                
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     self.force_reraise()                                                                                                                                     
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise                                                           
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     six.reraise(self.type_, self.value, self.tb)                                                                                                             
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/six.py", line 703, in reraise                                                                                 Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     raise value                                            
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/neutron_lib/db/api.py", line 179, in wrapped                                                                  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     return f(*dup_args, **dup_kwargs)                    
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/plugins/ml2/plugin.py", line 1652, in update_port                                                                      Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     port)                                
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/usr/local/lib/python3.6/dist-packages/neutron_lib/db/api.py", line 233, in wrapped                                                                  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     return method(*args, **kwargs)                      
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/db/db_base_plugin_v2.py", line 1503, in update_port                                                                    Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     new_port=new_port)                              
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/db/ipam_backend_mixin.py", line 703, in update_port                                                                    Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     new_port.get('mac_address'))                                                                                            
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/db/ipam_pluggable_backend.py", line 428, in update_port_with_ips                                                       
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     new_mac)                                                                                                                                                 Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/db/ipam_pluggable_backend.py", line 351, in _update_ips_for_port                                                       
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     fixed_ips=changes.add + changes.original)                                                                                                                Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/db/ipam_backend_mixin.py", line 657, in _ipam_get_subnets                                                              
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     fixed_ips)                                                                                                                                               Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/objects/subnet.py", line 338, in find_candidate_subnets                
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     query, fixed_ips).all()                                                                                                                                  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers   File "/home/vagrant/neutron/neutron/objects/subnet.py", line 394, in _query_filter_by_fixed_ips_segment                                          
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers     raise segment_exc.FixedIpsSubnetsNotOnSameSegment()                                                                                                      Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers neutron.services.segments.exceptions.FixedIpsSubnetsNotOnSameSegment: Cannot allocate addresses from different segments.    
  Apr 08 11:23:35 central neutron-server[10871]: ERROR neutron.plugins.ml2.managers                 


  Client error:
  BadRequestException: 400: Client Error for url: http://192.168.121.158:9696/v2.0/subnets, Cannot allocate addresses from different segments.


  Looks like we need to fix segment handling for metadata ports [2].

  
  [1] https://docs.openstack.org/ocata/networking-guide/config-routed-networks.html
  [2] https://github.com/openstack/neutron/blob/805bd1210e2286c02e59b2462ec6470ec81155b0/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L2127

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1871608/+subscriptions


Follow ups