← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1681946] [NEW] py27 unit test failure: ImageMetaProps has a system dependent hash signature.

 

Public bug reported:

Description
===========

Running the Nova py27 unit tests on CentOS will result in the following
failures:

nova.tests.unit.objects.test_objects.TestObjectVersions.test_versions
nova.tests.unit.notifications.objects.test_notification.TestNotificationObjectVersions.test_versions

With a traceback similar to the following:

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "nova/tests/unit/objects/test_objects.py", line 1216, in test_versions
        'Some objects have changed; please make sure the '
      File "/src/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/src/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = {'ImageMetaProps': '1.18-3e5975251f5843e817de68ac83274c27'}
    actual    = {'ImageMetaProps': '1.18-d62a383b8cfa1779cb98014a3bf91581'}
    : Some objects have changed; please make sure the versions have been bumped, and then update their hashes here.


This was introduced as part of the following change:

https://review.openstack.org/#/c/351232/


The ImageSignatureHashType and ImageSignatureKeyType now use cursive's signature_utils to generate a hash.  The problem is that these values can be different depending on the underlying capabilities of the system.  
For example:

Ubuntu Xenial:

>>> signature_utils.SignatureKeyType.REGISTERED_TYPES.keys()
['RSA-PSS', 'ECC_SECP521R1', 'ECC_SECT409R1', 'ECC_SECT409K1', 'ECC_SECT571R1', 'ECC_SECP384R1', 'ECC_SECT571K1', 'DSA']

CentOS 7.3.1611:

>>> signature_utils.SignatureKeyType.REGISTERED_TYPES.keys()
['RSA-PSS', 'ECC_SECP521R1', 'ECC_SECP384R1', 'DSA']


For this reason, the values can't be reliably compared with the hardcoded hash result in nova/tests/unit/objects/test_objects.py


Steps to reproduce
==================
1. tox -e py27 on a CentOs (7) system.  Other systems may suffer the same failures.

Expected result
===============
Unit tests pass

Actual result
=============
Unit tests failed

Environment
===========
1. Latest devstack, stock CentOS 7 VM, latest Nova

Logs & Configs
==============
https://pastebin.com/1rqJaTPs
http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2017-04-11.log.html#t2017-04-11T20:38:56

** Affects: nova
     Importance: Undecided
         Status: New

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

Title:
  py27 unit test failure: ImageMetaProps has a system dependent hash
  signature.

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========

  Running the Nova py27 unit tests on CentOS will result in the
  following failures:

  nova.tests.unit.objects.test_objects.TestObjectVersions.test_versions
  nova.tests.unit.notifications.objects.test_notification.TestNotificationObjectVersions.test_versions

  With a traceback similar to the following:

  Captured traceback:
  ~~~~~~~~~~~~~~~~~~~
      Traceback (most recent call last):
        File "nova/tests/unit/objects/test_objects.py", line 1216, in test_versions
          'Some objects have changed; please make sure the '
        File "/src/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
          self.assertThat(observed, matcher, message)
        File "/src/nova/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
          raise mismatch_error
      testtools.matchers._impl.MismatchError: !=:
      reference = {'ImageMetaProps': '1.18-3e5975251f5843e817de68ac83274c27'}
      actual    = {'ImageMetaProps': '1.18-d62a383b8cfa1779cb98014a3bf91581'}
      : Some objects have changed; please make sure the versions have been bumped, and then update their hashes here.

  
  This was introduced as part of the following change:

  https://review.openstack.org/#/c/351232/

  
  The ImageSignatureHashType and ImageSignatureKeyType now use cursive's signature_utils to generate a hash.  The problem is that these values can be different depending on the underlying capabilities of the system.  
  For example:

  Ubuntu Xenial:

  >>> signature_utils.SignatureKeyType.REGISTERED_TYPES.keys()
  ['RSA-PSS', 'ECC_SECP521R1', 'ECC_SECT409R1', 'ECC_SECT409K1', 'ECC_SECT571R1', 'ECC_SECP384R1', 'ECC_SECT571K1', 'DSA']

  CentOS 7.3.1611:

  >>> signature_utils.SignatureKeyType.REGISTERED_TYPES.keys()
  ['RSA-PSS', 'ECC_SECP521R1', 'ECC_SECP384R1', 'DSA']

  
  For this reason, the values can't be reliably compared with the hardcoded hash result in nova/tests/unit/objects/test_objects.py

  
  Steps to reproduce
  ==================
  1. tox -e py27 on a CentOs (7) system.  Other systems may suffer the same failures.

  Expected result
  ===============
  Unit tests pass

  Actual result
  =============
  Unit tests failed

  Environment
  ===========
  1. Latest devstack, stock CentOS 7 VM, latest Nova

  Logs & Configs
  ==============
  https://pastebin.com/1rqJaTPs
  http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2017-04-11.log.html#t2017-04-11T20:38:56

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


Follow ups