Reviewed:  https://review.openstack.org/388643
Committed: 
https://git.openstack.org/cgit/openstack/nova/commit/?id=758307c9e0ed17152aadb7aa5d3fb81f4bfe87e4
Submitter: Jenkins
Branch:    master

commit 758307c9e0ed17152aadb7aa5d3fb81f4bfe87e4
Author: Mikhail Feoktistov <mfeoktis...@virtuozzo.com>
Date:   Wed Oct 19 07:42:51 2016 -0400

    fix testcase test_check_can_live_migrate_dest_fills_listen_addrs
    
    We should set return_value=1 for compareCPU hook.
    Otherwise we'll get an exception InvalidCPUInfo:
    CPU doesn't have compatibility
    
    Change-Id: Id9313eb46084e60cf0c7f5a77fe9a8a7dc86b8fb
    Closes-Bug: #1634962


** Changed in: nova
       Status: In Progress => Fix Released

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

Title:
  "test_check_can_live_migrate_dest_fills_listen_addrs" failed due to
  incorrect mock

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  ==============================
  Failed 1 tests - output below:
  ==============================

  
nova.tests.unit.virt.libvirt.test_driver.LibvirtConnTestCase.test_check_can_live_migrate_dest_fills_listen_addrs
  
----------------------------------------------------------------------------------------------------------------

  Captured traceback:
  ~~~~~~~~~~~~~~~~~~~
      Traceback (most recent call last):
        File "/usr/lib/python2.7/site-packages/mock/mock.py", line 1305, in 
patched
          return func(*args, **keywargs)
        File "nova/tests/unit/virt/libvirt/test_driver.py", line 6837, in 
test_check_can_live_migrate_dest_fills_listen_addrs
          self.context, instance_ref, compute_info, compute_info)
        File "nova/virt/libvirt/driver.py", line 5390, in 
check_can_live_migrate_destination
          self._compare_cpu(instance.vcpu_model, None, instance)
        File "nova/virt/libvirt/driver.py", line 5660, in _compare_cpu
          raise exception.InvalidCPUInfo(reason=m % {'ret': ret, 'u': u})
      nova.exception.InvalidCPUInfo: Unacceptable CPU info: CPU doesn't have 
compatibility.

      <MagicMock name='compareCPU()' id='274274000'>

      Refer to http://libvirt.org/html/libvirt-libvirt-
  host.html#virCPUCompareResult

  Captured pythonlogging:
  ~~~~~~~~~~~~~~~~~~~~~~~
      2016-10-19 10:19:06,319 INFO [os_brick.initiator.connectors.disco] Init 
DISCO connector
      2016-10-19 10:19:06,320 WARNING [os_brick.initiator.connectors.remotefs] 
Connection details not present. RemoteFsClient may not initialize properly.
      2016-10-19 10:19:06,322 INFO [nova.virt.libvirt.driver] Connection event 
'1' reason 'None'
      2016-10-19 10:19:06,328 ERROR [nova.virt.libvirt.driver] CPU doesn't have 
compatibility.

      <MagicMock name='compareCPU()' id='274274000'>

      Refer to http://libvirt.org/html/libvirt-libvirt-
  host.html#virCPUCompareResult

  ======
  Totals
  ======
  Ran: 14517 tests in 1850.0000 sec.
   - Passed: 14458
   - Skipped: 58
   - Expected Fail: 0
   - Unexpected Success: 0
   - Failed: 1
  Sum of execute time for each test: 3527.7612 sec.

  
  ************************************************************
  It should be mocking as the following 
  @mock.patch.object(libvirt_driver.LibvirtDriver,
                     '_compare_cpu')
  instead of
  @mock.patch.object(fakelibvirt.Connection, 'compareCPU')

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to