python-keystoneclient unit test build failure

Bug #1858049 reported by Don Penney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Critical
Don Penney

Bug Description

Brief Description
-----------------

We’re hitting a build failure in python-keystoneclient in test code:
https://opendev.org/openstack/python-keystoneclient/src/branch/stable/stein/keystoneclient/tests/unit/v3/test_auth.py#L31

The test token expiry is set to "2020-01-01T00:00:10.000123Z", and the test then fails.

As a workaround, we could just comment out the %check in the spec, which runs the unit tests:
https://opendev.org/starlingx/upstream/src/branch/master/openstack/python-keystoneclient/centos/python-keystoneclient.spec#L217

That would probably allow the builds to succeed.

Here are the errors seen in python-keystoneclient:

{15} keystoneclient.tests.unit.v2_0.test_auth.AuthenticateAgainstKeystoneTests.test_authenticate_success_token_unscoped [0.009347s] ... FAILED
Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/builddir/build/BUILD/python-keystoneclient-3.19.0/keystoneclient/tests/unit/v2_0/test_auth.py", line 226, in test_authenticate_success_token_unscoped
        self.assertRequestBodyIs(json=self.TEST_REQUEST_BODY)
      File "/builddir/build/BUILD/python-keystoneclient-3.19.0/keystoneclient/tests/unit/utils.py", line 72, in assertRequestBodyIs
        self.assertEqual(json, val)
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = {'auth': {'token': {'id': '7497a5a479a041178c8988e973ea24f5'}}}
    actual = {u'auth': {u'tenantId': u'83f086cee02d4234a909590e68ca00da',
               u'token': {u'id': u'7497a5a479a041178c8988e973ea24f5'}}}

Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
    Making authentication request to http://127.0.0.1:5000/v2.0/tokens
    Failed to find endpoint for management url The service catalog is empty.
    Making authentication request to http://127.0.0.1:5000/v2.0/tokens
    Failed to find endpoint for management url The service catalog is empty.

{3} keystoneclient.tests.unit.v3.test_auth.AuthenticateAgainstKeystoneTests.test_authenticate_success_token_unscoped [0.011026s] ... FAILED
Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/builddir/build/BUILD/python-keystoneclient-3.19.0/keystoneclient/tests/unit/v3/test_auth.py", line 329, in test_authenticate_success_token_unscoped
        self.assertRequestBodyIs(json=self.TEST_REQUEST_BODY)
      File "/builddir/build/BUILD/python-keystoneclient-3.19.0/keystoneclient/tests/unit/utils.py", line 72, in assertRequestBodyIs
        self.assertEqual(json, val)
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = {'auth': {'identity': {'methods': ['token'],
                           'token': {'id': '960c83d28fa14046a3a1c8967ae19da2'}}}}
    actual = {u'auth': {u'identity': {u'methods': [u'token'],
                             u'token': {u'id': u'960c83d28fa14046a3a1c8967ae19da2'}},
               u'scope': {u'project': {u'id': u'f110ab7629924d18b0466aacbd6a148f'}}}}

Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
    Making authentication request to http://127.0.0.1:5000/v3/auth/tokens
    {"token": {"project": {"domain": {"id": "02c36756715a499cbed4a4807fbd5dca", "name": "93439078538f4d06aea85038a0124fbd"}, "id": "f110ab7629924d18b0466aacbd6a148f", "name": "4a827c43830e4247b8bc968d3082ff6a"}, "issued_at": "2013-05-29T16:55:21.468960Z", "methods": ["token", "password"], "expires_at": "2020-01-01T00:00:10.000123Z", "user": {"domain": {"id": "02c36756715a499cbed4a4807fbd5dca", "name": "93439078538f4d06aea85038a0124fbd"}, "id": "5c57c4d19e4942918293e8617abe2912", "name": "5c57c4d19e4942918293e8617abe2912"}}}
    Failed to find endpoint for management url The service catalog is empty.
    Making authentication request to http://127.0.0.1:5000/v3/auth/tokens
    {"token": {"project": {"domain": {"id": "02c36756715a499cbed4a4807fbd5dca", "name": "93439078538f4d06aea85038a0124fbd"}, "id": "f110ab7629924d18b0466aacbd6a148f", "name": "4a827c43830e4247b8bc968d3082ff6a"}, "issued_at": "2013-05-29T16:55:21.468960Z", "methods": ["token", "password"], "expires_at": "2020-01-01T00:00:10.000123Z", "user": {"domain": {"id": "02c36756715a499cbed4a4807fbd5dca", "name": "93439078538f4d06aea85038a0124fbd"}, "id": "5c57c4d19e4942918293e8617abe2912", "name": "5c57c4d19e4942918293e8617abe2912"}}}
    Failed to find endpoint for management url The service catalog is empty.

Severity
--------
Critical

Branch/Pull Time/Commit
-----------------------
master, as of Jan 1, 2020

Last Pass
---------
Dec 31, 2019 build successful

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to upstream (master)

Reviewed: https://review.opendev.org/700852
Committed: https://git.openstack.org/cgit/starlingx/upstream/commit/?id=8c7def7074be1a51fc9e01dcdafd8c99cb9115dd
Submitter: Zuul
Branch: master

commit 8c7def7074be1a51fc9e01dcdafd8c99cb9115dd
Author: Don Penney <email address hidden>
Date: Wed Jan 1 18:38:19 2020 -0500

    Skip UT in python-keystoneclient build

    The python-keystoneclient unit test code uses a token expiry of Jan 1,
    2020, which causes a failure as of that date. Skip running the tests
    as part of the build to avoid this issue.

    Change-Id: I85e780c6f40beb19d1527282f30b38879ccfc512
    Closes-Bug: 1858049
    Signed-off-by: Don Penney <email address hidden>

Changed in starlingx:
status: New → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Don Penney (dpenney)
tags: added: stx.zuul
tags: added: stx.build
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Marking as Critical for stx.4.0 (master) and stx.3.0 (r/stx.3.0) as this can affect any build of the stein-based keystoneclient

tags: added: stx.3.0 stx.4.0
Changed in starlingx:
importance: Undecided → Critical
Revision history for this message
Ghada Khalil (gkhalil) wrote :

@Don, please cherrypick this change to the r/stx.3.0 branch at your earliest convenience.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to upstream (r/stx.3.0)

Fix proposed to branch: r/stx.3.0
Review: https://review.opendev.org/700948

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to upstream (r/stx.3.0)

Reviewed: https://review.opendev.org/700948
Committed: https://git.openstack.org/cgit/starlingx/upstream/commit/?id=4981c83efd3590a6412fb034045ac49439f3b7cd
Submitter: Zuul
Branch: r/stx.3.0

commit 4981c83efd3590a6412fb034045ac49439f3b7cd
Author: Don Penney <email address hidden>
Date: Wed Jan 1 18:38:19 2020 -0500

    Skip UT in python-keystoneclient build

    The python-keystoneclient unit test code uses a token expiry of Jan 1,
    2020, which causes a failure as of that date. Skip running the tests
    as part of the build to avoid this issue.

    Change-Id: I85e780c6f40beb19d1527282f30b38879ccfc512
    Closes-Bug: 1858049
    Signed-off-by: Don Penney <email address hidden>
    (cherry picked from commit 8c7def7074be1a51fc9e01dcdafd8c99cb9115dd)

Ghada Khalil (gkhalil)
tags: added: in-r-stx30
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to upstream (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/705854

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to upstream (f/centos8)

Reviewed: https://review.opendev.org/705854
Committed: https://git.openstack.org/cgit/starlingx/upstream/commit/?id=41f7bff21b83512640f148fa208485beec85eeeb
Submitter: Zuul
Branch: f/centos8

commit 333380daef7623eeb8eed16245d3700227d3003c
Author: Kristal Dale <email address hidden>
Date: Fri Jan 17 13:30:49 2020 -0800

    Update landing pages for docs and release notes:

    - Use updated project name in titles/text
    - Correct text for link to Storyboard (docs)
    - Correct capitalization in section headings
    - Correct formatting for section headings
    - Update project name in link to release notes, api-ref
    - Update project name in config for docs/releasenotes/api-ref

    Story:2007193
    Task:38347

    Change-Id: I52a53260042e6924673230486476c394001683ca
    Signed-off-by: Kristal Dale <email address hidden>

commit 8c7def7074be1a51fc9e01dcdafd8c99cb9115dd
Author: Don Penney <email address hidden>
Date: Wed Jan 1 18:38:19 2020 -0500

    Skip UT in python-keystoneclient build

    The python-keystoneclient unit test code uses a token expiry of Jan 1,
    2020, which causes a failure as of that date. Skip running the tests
    as part of the build to avoid this issue.

    Change-Id: I85e780c6f40beb19d1527282f30b38879ccfc512
    Closes-Bug: 1858049
    Signed-off-by: Don Penney <email address hidden>

commit d1294d7e679460661b42af64c87480b429a3366c
Author: Shuicheng Lin <email address hidden>
Date: Wed Dec 18 12:47:23 2019 +0800

    Update Keyring password info before sending out notification

    Need update password before send out notification. Otherwise, any
    process which monitors the "updated" notification will still get old
    password from Keyring.

    Partial-Bug: 1853017

    Change-Id: Id1c94fedca41abe96c7b38880bf325d4a25a95eb
    Signed-off-by: Shuicheng Lin <email address hidden>

tags: added: in-f-centos8
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.