← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1464527] [NEW] VM can't communicate with others in DVR

 

Public bug reported:

In one openstack with multiple neutron-servers behind a haproxy, in bellow use case, VM can't communicate with others in DVR,
reproduce steps:
1. create a subnet and add this subnet to a DVR
2. bulk create two VMs with a specail compute node(this node does not include any VMs in this subnet) in this subnet
3. when a VM port status is ACTIVE, but another VM port status is BUILD, delete the VM which port status is ACTIVE
then I can't find the namespace of this DVR router, the reason is that when it 'delete_port', it will check the the all the ports status in this host and subnet using 'check_ports_active_on_host_and_subnet', but it check port ACTIVE status, sometimes a VM's port status will be BUILD

 def check_ports_active_on_host_and_subnet(self, context, host,port_id, subnet_id):
     """Check if there is any dvr serviceable port on the subnet_id."""
     filter_sub = {'fixed_ips': {'subnet_id': [subnet_id]}}
     ports = self._core_plugin.get_ports(context, filters=filter_sub)
     for port in ports:
         if (n_utils.is_dvr_serviced(port['device_owner'])
             and port['status'] == 'ACTIVE'
             and port['binding:host_id'] == host
             and port['id'] != port_id):
             LOG.debug('DVR: Active port exists for subnet %(subnet_id)s '
                       'on host %(host)s', {'subnet_id': subnet_id,
                                    'host': host})
             return True
     return False

** Affects: neutron
     Importance: Undecided
     Assignee: shihanzhang (shihanzhang)
         Status: New

** Description changed:

  In one openstack with multiple neutron-servers behind a haproxy, in bellow use case, VM can't communicate with others in DVR,
  reproduce steps:
  1. create a subnet and add this subnet to a DVR
  2. bulk create two VMs with a specail compute node(this node does not include any VMs in this subnet) in this subnet
  3. when a VM port status is ACTIVE, but another VM port status is BUILD, delete the VM which port status is ACTIVE
  then I can't find the namespace of this DVR router, the reason is that when it 'delete_port', it will check the the all the ports status in this host and subnet using 'check_ports_active_on_host_and_subnet', but it check port ACTIVE status, sometimes a VM's port status will be BUILD
  
-     def check_ports_active_on_host_and_subnet(self, context, host,
-                                          port_id, subnet_id):
-         """Check if there is any dvr serviceable port on the subnet_id."""
-         filter_sub = {'fixed_ips': {'subnet_id': [subnet_id]}}
-         ports = self._core_plugin.get_ports(context, filters=filter_sub)
-         for port in ports:
-             if (n_utils.is_dvr_serviced(port['device_owner'])
-                 and port['status'] == 'ACTIVE'
-                 and port['binding:host_id'] == host
-                 and port['id'] != port_id):
-                 LOG.debug('DVR: Active port exists for subnet %(subnet_id)s '
-                           'on host %(host)s', {'subnet_id': subnet_id,
-                                        'host': host})
-                 return True
-         return False
+     def check_ports_active_on_host_and_subnet(self, context, host,port_id, subnet_id):
+         """Check if there is any dvr serviceable port on the subnet_id."""
+         filter_sub = {'fixed_ips': {'subnet_id': [subnet_id]}}
+         ports = self._core_plugin.get_ports(context, filters=filter_sub)
+         for port in ports:
+             if (n_utils.is_dvr_serviced(port['device_owner'])
+                 and port['status'] == 'ACTIVE'
+                 and port['binding:host_id'] == host
+                 and port['id'] != port_id):
+                 LOG.debug('DVR: Active port exists for subnet %(subnet_id)s '
+                           'on host %(host)s', {'subnet_id': subnet_id,
+                                        'host': host})
+                 return True
+         return False

** Description changed:

  In one openstack with multiple neutron-servers behind a haproxy, in bellow use case, VM can't communicate with others in DVR,
  reproduce steps:
  1. create a subnet and add this subnet to a DVR
  2. bulk create two VMs with a specail compute node(this node does not include any VMs in this subnet) in this subnet
  3. when a VM port status is ACTIVE, but another VM port status is BUILD, delete the VM which port status is ACTIVE
  then I can't find the namespace of this DVR router, the reason is that when it 'delete_port', it will check the the all the ports status in this host and subnet using 'check_ports_active_on_host_and_subnet', but it check port ACTIVE status, sometimes a VM's port status will be BUILD
  
-     def check_ports_active_on_host_and_subnet(self, context, host,port_id, subnet_id):
-         """Check if there is any dvr serviceable port on the subnet_id."""
-         filter_sub = {'fixed_ips': {'subnet_id': [subnet_id]}}
-         ports = self._core_plugin.get_ports(context, filters=filter_sub)
-         for port in ports:
-             if (n_utils.is_dvr_serviced(port['device_owner'])
-                 and port['status'] == 'ACTIVE'
-                 and port['binding:host_id'] == host
-                 and port['id'] != port_id):
-                 LOG.debug('DVR: Active port exists for subnet %(subnet_id)s '
-                           'on host %(host)s', {'subnet_id': subnet_id,
-                                        'host': host})
-                 return True
-         return False
+  def check_ports_active_on_host_and_subnet(self, context, host,port_id, subnet_id):
+      """Check if there is any dvr serviceable port on the subnet_id."""
+      filter_sub = {'fixed_ips': {'subnet_id': [subnet_id]}}
+      ports = self._core_plugin.get_ports(context, filters=filter_sub)
+      for port in ports:
+          if (n_utils.is_dvr_serviced(port['device_owner'])
+              and port['status'] == 'ACTIVE'
+              and port['binding:host_id'] == host
+              and port['id'] != port_id):
+              LOG.debug('DVR: Active port exists for subnet %(subnet_id)s '
+                        'on host %(host)s', {'subnet_id': subnet_id,
+                                     'host': host})
+              return True
+      return False

** Changed in: neutron
     Assignee: (unassigned) => shihanzhang (shihanzhang)

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

Title:
  VM can't communicate with others in DVR

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  In one openstack with multiple neutron-servers behind a haproxy, in bellow use case, VM can't communicate with others in DVR,
  reproduce steps:
  1. create a subnet and add this subnet to a DVR
  2. bulk create two VMs with a specail compute node(this node does not include any VMs in this subnet) in this subnet
  3. when a VM port status is ACTIVE, but another VM port status is BUILD, delete the VM which port status is ACTIVE
  then I can't find the namespace of this DVR router, the reason is that when it 'delete_port', it will check the the all the ports status in this host and subnet using 'check_ports_active_on_host_and_subnet', but it check port ACTIVE status, sometimes a VM's port status will be BUILD

   def check_ports_active_on_host_and_subnet(self, context, host,port_id, subnet_id):
       """Check if there is any dvr serviceable port on the subnet_id."""
       filter_sub = {'fixed_ips': {'subnet_id': [subnet_id]}}
       ports = self._core_plugin.get_ports(context, filters=filter_sub)
       for port in ports:
           if (n_utils.is_dvr_serviced(port['device_owner'])
               and port['status'] == 'ACTIVE'
               and port['binding:host_id'] == host
               and port['id'] != port_id):
               LOG.debug('DVR: Active port exists for subnet %(subnet_id)s '
                         'on host %(host)s', {'subnet_id': subnet_id,
                                      'host': host})
               return True
       return False

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


Follow ups

References