make ovs-vsctl not raise error if there's no portData available.

Bug #1540537 reported by Jorge Niedbalski
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Fix Released
Medium
Jorge Niedbalski
Vivid
Invalid
Medium
Jorge Niedbalski

Bug Description

[Impact]

Nova Live migration task can fail if the source host
doesn't have a specific port or interface available because the port have been already migrated.

If this happens, we need to make ovs-vsctl not raise error if there's no portData available.

Example libvirtd.log:

2:2015-12-01 17:44:34.360+0000: 3379: error : virCommandWait:2399 : internal error: Child process (ovs-vsctl --timeout=5 get Interface tape7ad3f81-dc external_ids:PortData) unexpected exit status 1: ovs-vsctl: no key "PortData" in Interface record "tape7ad3f81-dc" column external_ids

[Test Case]

The steps to reproduce the problem:

1 define and start a domain with its network configured as:
    <interface type='bridge'>
          <source bridge='br0'/>
          <virtualport type='openvswitch'>
          </virtualport>
          <model type='virtio'/>
          <driver name='vhost' queues='4'/>
    </interface>

2 do not set the network's portData.

3 migrate(ToURI2) it with flag 91(1011011), which means:

  VIR_MIGRATE_LIVE
  VIR_MIGRATE_PEER2PEER
  VIR_MIGRATE_PERSIST_DEST
  VIR_MIGRATE_UNDEFINE_SOURCE
  VIR_MIGRATE_NON_SHARED_DISK

4 migrate success, but we got an error log in libvirtd.log:
  error : virCommandWait:2423 : internal error: Child process (ovs-vsctl --timeout=5 get Interface
  vnet1 external_ids:PortData) unexpected exit status 1: ovs-vsctl: no key "PortData" in Interface
  record "vnet1" column external_ids

[Regression Potential]

 * N/A

[Other Info]

 * This upstream commit fixes the issue: https://github.com/libvirt/libvirt/commit/25df57db73adc3e610193ee1fcdd202c47ba471d

tags: added: sts
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Trusty Patch" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Changed in libvirt (Ubuntu):
status: New → Fix Released
Changed in libvirt (Ubuntu Trusty):
status: New → In Progress
Changed in libvirt (Ubuntu Vivid):
status: New → In Progress
Changed in libvirt (Ubuntu Trusty):
assignee: nobody → Jorge Niedbalski (niedbalski)
Changed in libvirt (Ubuntu Vivid):
assignee: nobody → Jorge Niedbalski (niedbalski)
Mathew Hodson (mhodson)
Changed in libvirt (Ubuntu):
importance: Undecided → Medium
Changed in libvirt (Ubuntu Trusty):
importance: Undecided → Medium
Changed in libvirt (Ubuntu Vivid):
importance: Undecided → Medium
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Jorge, or anyone else affected,

Accepted libvirt into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libvirt/1.2.2-0ubuntu13.1.17 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in libvirt (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

These are the steps that I followed for verification:

1) I created 2 virtual machines

$ uvt-kvm create trusty
$ uvt-kvm create trusty2

2) On the primary (trusty) I created a machine called test

$ uvt-kvm create test

3) Installed openvswitch

$ sudo apt-get install openvswitch-switch

4) Created a new openvswitch bridge

$ sudo brctl addbr br0
$ sudo ovs-vsctl add-br br0
$ sudo ifconfig br0 up

5) Edited the network

$ virsh destroy test
$ virsh edit test

    <interface type='bridge'>
      <mac address='52:54:00:66:99:7b'/>
      <source bridge='br0'/>
      <virtualport type='openvswitch'>
        <parameters interfaceid='74178f6a-14bc-45d0-a54c-11aa8b907622'/>
      </virtualport>
      <model type='rtl8139'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </interface>

6) Start the domain

$ virsh start test

7) Migrate between both systems:

$ virsh migrate --live --p2p --persistent --abort-on-error trusty qemu+ssh://ubuntu@192.168.122.110/system

At this point the migration completes correctly, without the virCommandWait:2423 exception.

Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

verification-done

tags: added: verification-done
removed: verification-needed
Changed in libvirt (Ubuntu Vivid):
status: In Progress → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 1.2.2-0ubuntu13.1.17

---------------
libvirt (1.2.2-0ubuntu13.1.17) trusty; urgency=medium

  * d/p/fix-util-don-t-fail-if-no-portdata-is-found.patch:
    make ovs-vsctl not raise error if there's no portData available.
    (LP: #1540537).

 -- Jorge Niedbalski <email address hidden> Thu, 04 Feb 2016 16:58:31 +0100

Changed in libvirt (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for libvirt has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.