← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1807340] [NEW] Interface detach fails for VFHostUser vif

 

Public bug reported:

Description
===========
Nova skips removing VHostUser from libvirt, thinking that it
already deleted the interface

Error happened here:
https://github.com/openstack/nova/blob/c9dca64fa64005e5bea327f06a7a3f4821ab72b1/nova/virt/libvirt/driver.py#L1709

Interface was not present because target_dev does not match between libvirt and cfg
https://github.com/openstack/nova/blob/c9dca64fa64005e5bea327f06a7a3f4821ab72b1/nova/virt/libvirt/guest.py#L247

target_dev did not match, because nova does not fill value for target_dev 
https://github.com/openstack/nova/blob/5bf6f6304e185c4af2c1b19bc11631793acdfe02/nova/virt/libvirt/vif.py#L433


Steps to reproduce
==================
1. Launch VM with 2 vnics with type vhostuser
$ openstack port list --server test-vm
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
| ID                                   | Name | MAC Address       | Fixed IP Addresses                                                         | Status |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
| 7dc38cc5-7c04-4018-96ff-8975b357771e |      | fa:16:3e:25:a0:c4 | ip_address='10.10.12.10', subnet_id='417b8d8b-cb0f-4764-96ca-e716006ee8d1' | ACTIVE |
| ac02bb45-c913-4fed-aa9b-8448106a91d3 |      | fa:16:3e:54:de:9b | ip_address='10.10.13.9', subnet_id='d64b8217-22a4-475a-b323-bd03e39cc65e'  | ACTIVE |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
2. Detach one port from the VM:
$ nova detach-interface test-vm ac02bb45-c913-4fed-aa9b-8448106a91d3
$ openstack port list --server test-vm
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
| ID                                   | Name | MAC Address       | Fixed IP Addresses                                                         | Status |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
| 7dc38cc5-7c04-4018-96ff-8975b357771e |      | fa:16:3e:25:a0:c4 | ip_address='10.10.12.10', subnet_id='417b8d8b-cb0f-4764-96ca-e716006ee8d1' | ACTIVE |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
3. Check VM interface. Interface is still visible in the VM
[root@test-vm ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 9000 qdisc fq_codel state DOWN group default qlen 1000
    link/ether fa:16:3e:54:de:9b brd ff:ff:ff:ff:ff:ff
3: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc fq_codel state UP group default qlen 1000
    link/ether fa:16:3e:25:a0:c4 brd ff:ff:ff:ff:ff:ff
    inet 10.10.12.10/24 brd 10.10.12.255 scope global dynamic ens4
       valid_lft 85986sec preferred_lft 85986sec
    inet6 fe80::e7df:16b0:a13d:df37/64 scope link
       valid_lft forever preferred_lft forever

Expected result
===============
Interface ens3 should be removed

Environment
===========
Libvirt+KVM
$ /usr/libexec/qemu-kvm --version
QEMU emulator version 2.10.0
$ virsh --version
3.9.0
Neutron+OVS DPDK
Openstack Queens openstack-nova-compute-17.0.7-1

** Affects: nova
     Importance: Undecided
         Status: New

** Summary changed:

- Interface detach fails for VFHosUser vif
+ Interface detach fails for VFHostUser vif

-- 
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/1807340

Title:
  Interface detach fails for VFHostUser vif

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========
  Nova skips removing VHostUser from libvirt, thinking that it
  already deleted the interface

  Error happened here:
  https://github.com/openstack/nova/blob/c9dca64fa64005e5bea327f06a7a3f4821ab72b1/nova/virt/libvirt/driver.py#L1709

  Interface was not present because target_dev does not match between libvirt and cfg
  https://github.com/openstack/nova/blob/c9dca64fa64005e5bea327f06a7a3f4821ab72b1/nova/virt/libvirt/guest.py#L247

  target_dev did not match, because nova does not fill value for target_dev 
  https://github.com/openstack/nova/blob/5bf6f6304e185c4af2c1b19bc11631793acdfe02/nova/virt/libvirt/vif.py#L433

  
  Steps to reproduce
  ==================
  1. Launch VM with 2 vnics with type vhostuser
  $ openstack port list --server test-vm
  +--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
  | ID                                   | Name | MAC Address       | Fixed IP Addresses                                                         | Status |
  +--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
  | 7dc38cc5-7c04-4018-96ff-8975b357771e |      | fa:16:3e:25:a0:c4 | ip_address='10.10.12.10', subnet_id='417b8d8b-cb0f-4764-96ca-e716006ee8d1' | ACTIVE |
  | ac02bb45-c913-4fed-aa9b-8448106a91d3 |      | fa:16:3e:54:de:9b | ip_address='10.10.13.9', subnet_id='d64b8217-22a4-475a-b323-bd03e39cc65e'  | ACTIVE |
  +--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
  2. Detach one port from the VM:
  $ nova detach-interface test-vm ac02bb45-c913-4fed-aa9b-8448106a91d3
  $ openstack port list --server test-vm
  +--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
  | ID                                   | Name | MAC Address       | Fixed IP Addresses                                                         | Status |
  +--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
  | 7dc38cc5-7c04-4018-96ff-8975b357771e |      | fa:16:3e:25:a0:c4 | ip_address='10.10.12.10', subnet_id='417b8d8b-cb0f-4764-96ca-e716006ee8d1' | ACTIVE |
  +--------------------------------------+------+-------------------+----------------------------------------------------------------------------+--------+
  3. Check VM interface. Interface is still visible in the VM
  [root@test-vm ~]# ip a
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
         valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
         valid_lft forever preferred_lft forever
  2: ens3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 9000 qdisc fq_codel state DOWN group default qlen 1000
      link/ether fa:16:3e:54:de:9b brd ff:ff:ff:ff:ff:ff
  3: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc fq_codel state UP group default qlen 1000
      link/ether fa:16:3e:25:a0:c4 brd ff:ff:ff:ff:ff:ff
      inet 10.10.12.10/24 brd 10.10.12.255 scope global dynamic ens4
         valid_lft 85986sec preferred_lft 85986sec
      inet6 fe80::e7df:16b0:a13d:df37/64 scope link
         valid_lft forever preferred_lft forever

  Expected result
  ===============
  Interface ens3 should be removed

  Environment
  ===========
  Libvirt+KVM
  $ /usr/libexec/qemu-kvm --version
  QEMU emulator version 2.10.0
  $ virsh --version
  3.9.0
  Neutron+OVS DPDK
  Openstack Queens openstack-nova-compute-17.0.7-1

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


Follow ups