yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #63202
[Bug 1681946] Re: py27 unit test failure: ImageMetaProps has a system dependent hash signature.
Reviewed: https://review.openstack.org/456204
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d015b9804213f7a2dbde0f54256f665098007c6f
Submitter: Jenkins
Branch: master
commit d015b9804213f7a2dbde0f54256f665098007c6f
Author: dane-fichter <dane.fichter@xxxxxxxxxx>
Date: Tue Mar 28 02:43:39 2017 -0700
Remove backend dependency for key types
This change moves the ImageMetaProp's SignatureKeyType
tuple from a dynamically loaded object to a static tuple,
removing the dependency on the OpenSSL backend, which
can vary from OS to OS.
Depends-On: Idbda49587f3b62a0870d10817291205bde0e821e
Change-Id: Id5191e575191d3beaa24435e98a3852dddcfe3bf
Closes-Bug: #1681946
** 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/1681946
Title:
py27 unit test failure: ImageMetaProps has a system dependent hash
signature.
Status in OpenStack Compute (nova):
Fix Released
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
References