← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1847766] Re: test_boot_from_volume_10_servers_255_volumes_2_images fails intermittently

 

Reviewed:  https://review.opendev.org/688132
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=cacca209ab4458378a9e2522ff50078826933c3e
Submitter: Zuul
Branch:    master

commit cacca209ab4458378a9e2522ff50078826933c3e
Author: Balazs Gibizer <balazs.gibizer@xxxxxxxx>
Date:   Fri Oct 11 15:48:56 2019 +0200

    Avoid using image with kernel in BDM large request func test
    
    The test_boot_from_volume_10_servers_255_volumes_2_images uses two
    random images to build servers with a lot of BDMs and asserts that an
    image cache is used to avoid hitting glance for the same image many
    times. The functional tests uses _FakeImageService that predefines a
    list of images. The test selects the first two returned by the
    api.get_images() call. As the fixture stores the images in a dict the
    returned image list is random in python2.7. Therefore the test runs with
    two random images. One of the images
    c905cedb-7281-47e4-8a62-f26bc5fc4c77 is defined to use a separate kernel
    image. If this image is selected for the test then an extra glance call
    is made from _handle_kernel_and_ramdisk(). This makes the test unstable
    as sometimes there is 4 calls instead of the asserted (and more common)
    3 calls nova.image.api.API.get().
    
    This patch hardcodes the image_ids used in the test to avoid the
    instability.
    
    Change-Id: Ic0a9c3ffb4e52430deb26bc6ad7758105f02968b
    Closes-Bug: #1847766


** 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/1847766

Title:
  test_boot_from_volume_10_servers_255_volumes_2_images fails
  intermittently

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  Patch I1233fbbaebd1750f572432bf74759b94408a17e3 merged yesterday adds
  a test case test_boot_from_volume_10_servers_255_volumes_2_images that
  fails intermittently:

  
  2019-10-10 16:42:33.007873 | ubuntu-bionic |

  2019-10-10 16:42:33.007931 | ubuntu-bionic | Captured traceback:

  2019-10-10 16:42:33.007985 | ubuntu-bionic | ~~~~~~~~~~~~~~~~~~~

  2019-10-10 16:42:33.008067 | ubuntu-bionic |     Traceback (most
  recent call last):

  2019-10-10 16:42:33.008264 | ubuntu-bionic |       File
  "nova/tests/functional/test_boot_from_volume.py", line 229, in
  test_boot_from_volume_10_servers_255_volumes_2_images

  2019-10-10 16:42:33.008365 | ubuntu-bionic |
  self.assertEqual(3, mock_image_get.call_count)

  2019-10-10 16:42:33.008598 | ubuntu-bionic |       File
  "/home/zuul/src/opendev.org/openstack/nova/.tox/functional/local/lib/python2.7
  /site-packages/testtools/testcase.py", line 411, in assertEqual

  2019-10-10 16:42:33.008737 | ubuntu-bionic |
  self.assertThat(observed, matcher, message)

  2019-10-10 16:42:33.008971 | ubuntu-bionic |       File
  "/home/zuul/src/opendev.org/openstack/nova/.tox/functional/local/lib/python2.7
  /site-packages/testtools/testcase.py", line 498, in assertThat

  2019-10-10 16:42:33.009036 | ubuntu-bionic |         raise
  mismatch_error

  2019-10-10 16:42:33.009130 | ubuntu-bionic |
  testtools.matchers._impl.MismatchError: 3 != 4

  
  I see 4 independent hits in logstash:

  http://logstash.openstack.org/#dashboard/file/logstash.json?query=message%3A%5C%22testtools.matchers._impl.MismatchError%3A%203%20!%3D%204%5C%22%20AND%20project%3A%5C%22openstack%2Fnova%5C%22

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


References