← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1341498] [NEW] Port still existed after attach interface failed

 

Public bug reported:

$ nova boot --flavor 1 --image 01efb526-8046-40d0-b276-ba32e570c965 vm1


$ nova list
+--------------------------------------+------+--------+------------+-------------+----------------+
| ID                                   | Name | Status | Task State | Power State | Networks       |
+--------------------------------------+------+--------+------------+-------------+----------------+
| 50cf7eb6-cfc8-4fb6-9e87-18fc77b2740f | vm1  | BUILD  | spawning   | NOSTATE     | net1=10.0.0.15 |
+--------------------------------------+------+--------+------------+-------------+----------------+


$ nova interface-attach vm1 --net-id 72cad723-3ce1-402b-ac4b-746274cbad9d
ERROR (InternalServerError): Failed to attach interface (HTTP 500) (Request-ID: req-c369b3fd-6bcd-4375-9a92-d1bff523132e)


And get error from compute-manager:

2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher     incoming.message))
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher     return self._do_dispatch(endpoint, method, ctxt, args)
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher     result = getattr(endpoint, method)(ctxt, **new_args)
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 395, in decorated_function
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 4460, in attach_interface
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher     try:
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1385, in attach_interface
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher     raise exception.InterfaceAttachFailed(instance)
2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher InterfaceAttachFailed: Instance(access_ip_v4=None,access_ip_v6=None,architecture=None,auto_disk_config=False,availability_zone=None,cell_name=None,cleaned=False,config_drive='',created_at=2014-07-14T09:34:15Z,default_ephemeral_device=None,default_swap_device=None,deleted=False,deleted_at=None,disable_terminate=False,display_description='vm1',display_name='vm1',ephemeral_gb=0,ephemeral_key_uuid=None,fault=<?>,host='soulxu1404-ThinkPad-T410',hostname='vm1',id=232,image_ref='01efb526-8046-40d0-b276-ba32e570c965',info_cache=InstanceInfoCache,instance_type_id=2,kernel_id='efa41ea7-22f0-4e08-82b7-74eb0368b28f',key_data=None,key_name=None,launch_index=0,launched_at=2014-07-14T09:34:23Z,launched_on='soulxu1404-ThinkPad-T410',locked=False,locked_by=None,memory_mb=512,metadata={},node='soulxu1404-ThinkPad-T410',os_type=None,pci_devices=<?>,power_state=1,progress=0,project_id='ac99aeb3fbb24494b3bbb68a8e94cbff',ramdisk_id='eb736431-a77b-4994-ad2b-e090c590e57a',reservation_id='r-plzhjx8o',root_device_name='/dev/vda',root_gb=1,scheduled_at=None,security_groups=SecurityGroupList,shutdown_terminate=False,system_metadata={image_base_image_ref='01efb526-8046-40d0-b276-ba32e570c965',image_container_format='ami',image_disk_format='ami',image_kernel_id='efa41ea7-22f0-4e08-82b7-74eb0368b28f',image_min_disk='1',image_min_ram='0',image_ramdisk_id='eb736431-a77b-4994-ad2b-e090c590e57a',image_test='1',instance_type_ephemeral_gb='0',instance_type_flavorid='1',instance_type_id='2',instance_type_memory_mb='512',instance_type_name='m1.tiny',instance_type_root_gb='1',instance_type_rxtx_factor='1.0',instance_type_swap='0',instance_type_vcpu_weight=None,instance_type_vcpus='1'},task_state=None,terminated_at=None,updated_at=2014-07-14T09:34:24Z,user_data=None,user_id='2c08e17d6fb54dea96cc6d70ba0ee75f',uuid=50cf7eb6-cfc8-4fb6-9e87-18fc77b2740f,vcpus=1,vm_mode=None,vm_state='active')


$ nova list
+--------------------------------------+------+--------+------------+-------------+---------------------------+
| ID                                   | Name | Status | Task State | Power State | Networks                  |
+--------------------------------------+------+--------+------------+-------------+---------------------------+
| 50cf7eb6-cfc8-4fb6-9e87-18fc77b2740f | vm1  | ACTIVE | -          | Running     | net1=10.0.0.15, 10.0.0.16 |
+--------------------------------------+------+--------+------------+-------------+---------------------------+

$ neutron port-show a342ea6e-cc73-48b6-a08d-c2d0c472f859
Starting new HTTP connection (1): cloudcontroller
Starting new HTTP connection (1): cloudcontroller
Starting new HTTP connection (1): cloudcontroller
+-----------------------+----------------------------------------------------------------------------------+
| Field                 | Value                                                                            |
+-----------------------+----------------------------------------------------------------------------------+
| admin_state_up        | True                                                                             |
| allowed_address_pairs |                                                                                  |
| binding:host_id       | soulxu1404-ThinkPad-T410                                                         |
| binding:profile       | {}                                                                               |
| binding:vif_details   | {"port_filter": true}                                                            |
| binding:vif_type      | bridge                                                                           |
| binding:vnic_type     | normal                                                                           |
| device_id             | 50cf7eb6-cfc8-4fb6-9e87-18fc77b2740f                                             |
| device_owner          | compute:None                                                                     |
| extra_dhcp_opts       |                                                                                  |
| fixed_ips             | {"subnet_id": "f1b4645d-7c4d-42f1-9c9d-24738e45d268", "ip_address": "10.0.0.16"} |
| id                    | a342ea6e-cc73-48b6-a08d-c2d0c472f859                                             |
| mac_address           | fa:16:3e:ac:e7:9f                                                                |
| name                  |                                                                                  |
| network_id            | 72cad723-3ce1-402b-ac4b-746274cbad9d                                             |
| security_groups       | c4cee52e-33ff-40d3-9fdc-e96fc703af1d                                             |
| status                | DOWN                                                                             |
| tenant_id             | ac99aeb3fbb24494b3bbb68a8e94cbff                                                 |
+-----------------------+----------------------------------------------------------------------------------+


Actually the port isn't attach to instance. The port should be deleted after attach interface failed.

** Affects: nova
     Importance: Low
     Assignee: Alex Xu (xuhj)
         Status: In Progress

** Changed in: nova
     Assignee: (unassigned) => Alex Xu (xuhj)

** Changed in: nova
   Importance: Undecided => Low

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1341498

Title:
  Port still existed after attach interface failed

Status in OpenStack Compute (Nova):
  In Progress

Bug description:
  $ nova boot --flavor 1 --image 01efb526-8046-40d0-b276-ba32e570c965
  vm1

  
  $ nova list
  +--------------------------------------+------+--------+------------+-------------+----------------+
  | ID                                   | Name | Status | Task State | Power State | Networks       |
  +--------------------------------------+------+--------+------------+-------------+----------------+
  | 50cf7eb6-cfc8-4fb6-9e87-18fc77b2740f | vm1  | BUILD  | spawning   | NOSTATE     | net1=10.0.0.15 |
  +--------------------------------------+------+--------+------------+-------------+----------------+

  
  $ nova interface-attach vm1 --net-id 72cad723-3ce1-402b-ac4b-746274cbad9d
  ERROR (InternalServerError): Failed to attach interface (HTTP 500) (Request-ID: req-c369b3fd-6bcd-4375-9a92-d1bff523132e)

  
  And get error from compute-manager:

  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher     incoming.message))
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher     return self._do_dispatch(endpoint, method, ctxt, args)
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher     result = getattr(endpoint, method)(ctxt, **new_args)
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 395, in decorated_function
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 4460, in attach_interface
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher     try:
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1385, in attach_interface
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher     raise exception.InterfaceAttachFailed(instance)
  2014-07-14 17:34:49.072 TRACE oslo.messaging.rpc.dispatcher InterfaceAttachFailed: Instance(access_ip_v4=None,access_ip_v6=None,architecture=None,auto_disk_config=False,availability_zone=None,cell_name=None,cleaned=False,config_drive='',created_at=2014-07-14T09:34:15Z,default_ephemeral_device=None,default_swap_device=None,deleted=False,deleted_at=None,disable_terminate=False,display_description='vm1',display_name='vm1',ephemeral_gb=0,ephemeral_key_uuid=None,fault=<?>,host='soulxu1404-ThinkPad-T410',hostname='vm1',id=232,image_ref='01efb526-8046-40d0-b276-ba32e570c965',info_cache=InstanceInfoCache,instance_type_id=2,kernel_id='efa41ea7-22f0-4e08-82b7-74eb0368b28f',key_data=None,key_name=None,launch_index=0,launched_at=2014-07-14T09:34:23Z,launched_on='soulxu1404-ThinkPad-T410',locked=False,locked_by=None,memory_mb=512,metadata={},node='soulxu1404-ThinkPad-T410',os_type=None,pci_devices=<?>,power_state=1,progress=0,project_id='ac99aeb3fbb24494b3bbb68a8e94cbff',ramdisk_id='eb736431-a77b-4994-ad2b-e090c590e57a',reservation_id='r-plzhjx8o',root_device_name='/dev/vda',root_gb=1,scheduled_at=None,security_groups=SecurityGroupList,shutdown_terminate=False,system_metadata={image_base_image_ref='01efb526-8046-40d0-b276-ba32e570c965',image_container_format='ami',image_disk_format='ami',image_kernel_id='efa41ea7-22f0-4e08-82b7-74eb0368b28f',image_min_disk='1',image_min_ram='0',image_ramdisk_id='eb736431-a77b-4994-ad2b-e090c590e57a',image_test='1',instance_type_ephemeral_gb='0',instance_type_flavorid='1',instance_type_id='2',instance_type_memory_mb='512',instance_type_name='m1.tiny',instance_type_root_gb='1',instance_type_rxtx_factor='1.0',instance_type_swap='0',instance_type_vcpu_weight=None,instance_type_vcpus='1'},task_state=None,terminated_at=None,updated_at=2014-07-14T09:34:24Z,user_data=None,user_id='2c08e17d6fb54dea96cc6d70ba0ee75f',uuid=50cf7eb6-cfc8-4fb6-9e87-18fc77b2740f,vcpus=1,vm_mode=None,vm_state='active')

  
  $ nova list
  +--------------------------------------+------+--------+------------+-------------+---------------------------+
  | ID                                   | Name | Status | Task State | Power State | Networks                  |
  +--------------------------------------+------+--------+------------+-------------+---------------------------+
  | 50cf7eb6-cfc8-4fb6-9e87-18fc77b2740f | vm1  | ACTIVE | -          | Running     | net1=10.0.0.15, 10.0.0.16 |
  +--------------------------------------+------+--------+------------+-------------+---------------------------+

  $ neutron port-show a342ea6e-cc73-48b6-a08d-c2d0c472f859
  Starting new HTTP connection (1): cloudcontroller
  Starting new HTTP connection (1): cloudcontroller
  Starting new HTTP connection (1): cloudcontroller
  +-----------------------+----------------------------------------------------------------------------------+
  | Field                 | Value                                                                            |
  +-----------------------+----------------------------------------------------------------------------------+
  | admin_state_up        | True                                                                             |
  | allowed_address_pairs |                                                                                  |
  | binding:host_id       | soulxu1404-ThinkPad-T410                                                         |
  | binding:profile       | {}                                                                               |
  | binding:vif_details   | {"port_filter": true}                                                            |
  | binding:vif_type      | bridge                                                                           |
  | binding:vnic_type     | normal                                                                           |
  | device_id             | 50cf7eb6-cfc8-4fb6-9e87-18fc77b2740f                                             |
  | device_owner          | compute:None                                                                     |
  | extra_dhcp_opts       |                                                                                  |
  | fixed_ips             | {"subnet_id": "f1b4645d-7c4d-42f1-9c9d-24738e45d268", "ip_address": "10.0.0.16"} |
  | id                    | a342ea6e-cc73-48b6-a08d-c2d0c472f859                                             |
  | mac_address           | fa:16:3e:ac:e7:9f                                                                |
  | name                  |                                                                                  |
  | network_id            | 72cad723-3ce1-402b-ac4b-746274cbad9d                                             |
  | security_groups       | c4cee52e-33ff-40d3-9fdc-e96fc703af1d                                             |
  | status                | DOWN                                                                             |
  | tenant_id             | ac99aeb3fbb24494b3bbb68a8e94cbff                                                 |
  +-----------------------+----------------------------------------------------------------------------------+

  
  Actually the port isn't attach to instance. The port should be deleted after attach interface failed.

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


Follow ups

References