Master Scenario002 is failing on Barbican related tempest test - tempest.lib.exceptions.UnexpectedResponseCode: Unexpected response code received , Details: 503

Bug #1973568 reported by Sandeep Yadav
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Unassigned

Bug Description

Description:-

Master Scenario002 is failing on Barbican related tempest test - tempest.lib.exceptions.UnexpectedResponseCode: Unexpected response code received , Details: 503

Issue started on 13th May:-

https://review.rdoproject.org/zuul/builds?job_name=periodic-tripleo-ci-centos-9-scenario002-standalone-master

log snippet:-

https://logserver.rdoproject.org/openstack-periodic-integration-main/opendev.org/openstack/tripleo-ci/master/periodic-tripleo-ci-centos-9-scenario002-standalone-master/070da93/logs/undercloud/var/log/tempest/failing_tests.log.txt.gz

failing tests:-
~~~
barbican_tempest_plugin.tests.scenario.test_image_signing.ImageSigningSnapshotTest.test_signed_image_upload_boot_snapshot[compute,id-f0603dfd-8b2c-44e2-8b0f-d65c87aab257,image]
barbican_tempest_plugin.tests.scenario.test_image_signing.ImageSigningTest.test_signed_image_upload_and_boot[compute,id-4343df3c-5553-40ea-8705-0cce73b297a9,image]
~~~

traceback:-

~~~
==============================
Failed 2 tests - output below:
==============================

barbican_tempest_plugin.tests.scenario.test_image_signing.ImageSigningSnapshotTest.test_signed_image_upload_boot_snapshot[compute,id-f0603dfd-8b2c-44e2-8b0f-d65c87aab257,image]
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib/python3.9/site-packages/barbican_tempest_plugin/tests/scenario/barbican_manager.py", line 78, in setUp
    self.signing_cert_uuid = self._store_cert(

      File "/usr/lib/python3.9/site-packages/barbican_tempest_plugin/tests/scenario/barbican_manager.py", line 167, in _store_cert
    result = self.secret_client.create_secret(

      File "/usr/lib/python3.9/site-packages/barbican_tempest_plugin/services/key_manager/json/secret_client.py", line 44, in create_secret
    resp, body = self.post("v1/secrets", body)

      File "/usr/lib/python3.9/site-packages/tempest/lib/common/rest_client.py", line 299, in post
    return self.request('POST', url, extra_headers, headers, body, chunked)

      File "/usr/lib/python3.9/site-packages/tempest/lib/common/rest_client.py", line 703, in request
    self._error_checker(resp, resp_body)

      File "/usr/lib/python3.9/site-packages/tempest/lib/common/rest_client.py", line 883, in _error_checker
    raise exceptions.UnexpectedResponseCode(str(resp.status),

    tempest.lib.exceptions.UnexpectedResponseCode: Unexpected response code received
Details: 503

Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
    2022-05-16 01:42:07,963 214690 WARNING [tempest.api.compute.api_microversion_fixture] APIMicroversionFixture class is deprecated and moved to tempest.lib.common.api_microversion_fixture.APIMicroversionFixture. It will be removed in Z cycle.
2022-05-16 01:42:08,597 214690 DEBUG [barbican_tempest_plugin.tests.scenario.barbican_manager] Uploading certificate to barbican
2022-05-16 01:42:08,602 214690 INFO [tempest.lib.common.rest_client] Request (ImageSigningSnapshotTest:setUp): 503 POST http://192.168.24.3:9311/v1/secrets 0.004s
2022-05-16 01:42:08,602 214690 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"expiration": "2022-05-21T01:42:08.597707", "algorithm": "rsa", "secret_type": "certificate", "payload_content_type": "application/octet-stream", "payload_content_encoding": "base64", "payload": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVkVENDQXQyZ0F3SUJBZ0lVV3hKQjRzVFZVaVU5V2h3T1ZDUU9kbUpPMUJvd0RRWUpLb1pJaHZjTkFRRUwKQlFBd1lqRUxNQWtHQTFVRUJoTUNWVk14Q3pBSkJnTlZCQWdNQWtOQk1SWXdGQVlEVlFRSERBMVRZVzRnUm5KaApibU5wYzJOdk1STXdFUVlEVlFRS0RBcE5lU0JEYjIxd1lXNTVNUmt3RndZRFZRUUREQkJVWlhOMElFTmxjblJwClptbGpZWFJsTUI0WERUSXlNRFV4TmpBeE5ESXdPRm9Y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UVCQ3dVQUE0SUJnUUJGWnNmLzJHbGQKeXYrdW9OeXZqVlFhMkwyb2JUUkVubWVOMkFCb1F0VFpPaTJHSXVaenYwSWRzN3AxMDlPU25vTmlrS1psVTNFMwp6cGs1L3dvOU92SldTdDlpTHFLbmR4bXM5RmNtTXQ0K1VMZS94SnlLRmtuNXQ2UTFOOHJLNmZ5ZDY0eW8ycWQyCi9zLzRHdnZYNkE1bW1XU1hkTFBzeWdTeEhtcy9kOUw1ZGdVTVlwc1cvTnRGVDRkMEhSWVRsYldtWXV3UTNtU3EKaDVqSFpzWlNLOU5nSzA5dXhxL2RxSEV5MWtqcS9pM2J2OWFpVVo1b1d0amQ5V1hZQTNZR3V2VkdnZFRLZWRQTgpwRk16NHI3czA2YjNJelREMFYwdVlQT0xiTzVKaHdRaXI5OFpUTGtXWDg1YlJxMDhWNGtGWk5LK0hGNHExRmlBClZNaUJnOW9ndUc3MlR3Q09aemNhQkxqcFZUTXpmQ3Zvb2ZwRUR0M2RKc3pzZGw4VGVFRFJOREhEdGlHdWZIY1oKTXZXZ0lEaEtjTHpxSllabS9yUmpZQXJteWNqaU5uTW00bTZyTTdENVA5YVNWWXF3SWEvR0VySVpRWXhvMHdIZwpLWWR3UC92S1RZNXBuUm1vWXh4Z0hzaURKSVZyZjNjVHZ2MnRjZ1RMN0pFb2VwYkdsR00vK3dZPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==", "name": "tempest-tempest-sec-2075813135"}
    Response - Headers: {'content-length': '107', 'cache-control': 'no-cache', 'content-type': 'text/html', 'connection': 'close', 'status': '503', 'content-location': 'http://192.168.24.3:9311/v1/secrets'}
        Body: b'<html><body><h1>503 Service Unavailable</h1>\nNo server is available to handle this request.\n</body></html>\n'

barbican_tempest_plugin.tests.scenario.test_image_signing.ImageSigningTest.test_signed_image_upload_and_boot[compute,id-4343df3c-5553-40ea-8705-0cce73b297a9,image]
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib/python3.9/site-packages/barbican_tempest_plugin/tests/scenario/barbican_manager.py", line 78, in setUp
    self.signing_cert_uuid = self._store_cert(

      File "/usr/lib/python3.9/site-packages/barbican_tempest_plugin/tests/scenario/barbican_manager.py", line 167, in _store_cert
    result = self.secret_client.create_secret(

      File "/usr/lib/python3.9/site-packages/barbican_tempest_plugin/services/key_manager/json/secret_client.py", line 44, in create_secret
    resp, body = self.post("v1/secrets", body)

      File "/usr/lib/python3.9/site-packages/tempest/lib/common/rest_client.py", line 299, in post
    return self.request('POST', url, extra_headers, headers, body, chunked)

      File "/usr/lib/python3.9/site-packages/tempest/lib/common/rest_client.py", line 703, in request
    self._error_checker(resp, resp_body)

      File "/usr/lib/python3.9/site-packages/tempest/lib/common/rest_client.py", line 883, in _error_checker
    raise exceptions.UnexpectedResponseCode(str(resp.status),

    tempest.lib.exceptions.UnexpectedResponseCode: Unexpected response code received
Details: 503

Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
    2022-05-16 01:42:28,246 214689 WARNING [tempest.api.compute.api_microversion_fixture] APIMicroversionFixture class is deprecated and moved to tempest.lib.common.api_microversion_fixture.APIMicroversionFixture. It will be removed in Z cycle.
2022-05-16 01:42:29,414 214689 DEBUG [barbican_tempest_plugin.tests.scenario.barbican_manager] Uploading certificate to barbican
2022-05-16 01:42:29,417 214689 INFO [tempest.lib.common.rest_client] Request (ImageSigningTest:setUp): 503 POST http://192.168.24.3:9311/v1/secrets 0.002s
2022-05-16 01:42:29,417 214689 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"expiration": "2022-05-21T01:42:29.414392", "algorithm": "rsa", "secret_type": "certificate", "payload_content_type": "application/octet-stream", "payload_content_encoding": "base64", "payload": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVkVENDQXQyZ0F3SUJ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': '107', 'cache-control': 'no-cache', 'content-type': 'text/html', 'connection': 'close', 'status': '503', 'content-location': 'http://192.168.24.3:9311/v1/secrets'}
        Body: b'<html><body><h1>503 Service Unavailable</h1>\nNo server is available to handle this request.\n</body></html>\n'
~~~

More failures:

https://logserver.rdoproject.org/openstack-periodic-integration-main/opendev.org/openstack/tripleo-ci/master/periodic-tripleo-ci-centos-9-scenario002-standalone-master/7b0c1d2/logs/

Revision history for this message
Sandeep Yadav (sandeepyadav93) wrote :

Openstack rpm diff between last current-tripleo and tripleo-ci-testing(which is currently under test)

https://paste.openstack.org/show/bOxAXsz1yYAg4WhrBcmT/

barbican package is updated as well:-
~~~
openstack-barbican-14.1.0-0.20220425152407.33579d4.el9
openstack-barbican-14.1.0-0.20220511210814.ad5f900.el9
~~~

Revision history for this message
Takashi Kajinami (kajinamit) wrote (last edit ):

https://logserver.rdoproject.org/openstack-periodic-integration-main/opendev.org/openstack/tripleo-ci/master/periodic-tripleo-ci-centos-9-scenario002-standalone-master/070da93/logs/undercloud/var/log/containers/httpd/barbican-api/barbican_wsgi_main_error.log.txt.gz

~~~
[Mon May 16 01:30:03.286081 2022] [wsgi:error] [pid 16:tid 27] [remote 192.168.24.1:50942] mod_wsgi (pid=16): Failed to exec Python script file '/var/www/cgi-bin/barbican/main'.
...
[Mon May 16 01:30:03.290822 2022] [wsgi:error] [pid 16:tid 27] [remote 192.168.24.1:50942] File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2456, in resolve
[Mon May 16 01:30:03.290824 2022] [wsgi:error] [pid 16:tid 27] [remote 192.168.24.1:50942] module = __import__(self.module_name, fromlist=['__name__'], level=0)
[Mon May 16 01:30:03.290828 2022] [wsgi:error] [pid 16:tid 27] [remote 192.168.24.1:50942] File "/usr/lib/python3.9/site-packages/barbican/api/middleware/microversion.py", line 21, in <module>
[Mon May 16 01:30:03.290831 2022] [wsgi:error] [pid 16:tid 27] [remote 192.168.24.1:50942] from microversion_parse import middleware as microversion_middleware
[Mon May 16 01:30:03.290845 2022] [wsgi:error] [pid 16:tid 27] [remote 192.168.24.1:50942] ModuleNotFoundError: No module named 'microversion_parse'
~~~

The following change added dependency on microversionparse but that library is missing from package dependency looking at barbican-distgit.

https://review.opendev.org/c/openstack/barbican/+/828829

Revision history for this message
Takashi Kajinami (kajinamit) wrote :

> The following change added dependency on microversionparse but that library is missing from package dependency looking at barbican-distgit.
>
> https://review.opendev.org/c/openstack/barbican/+/828829

https://review.rdoproject.org/r/c/openstack/barbican-distgit/+/42876

Revision history for this message
Jakob Meng (jm1337) wrote :

Other errors from the logs which might be worth to investigate:

  2022-05-15 17:51:35.806 18 ERROR futurist.periodics oslo_db.exception.DBConnectionError
  (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query')

https://logserver.rdoproject.org/openstack-periodic-integration-main/opendev.org/openstack/tripleo-ci/master/periodic-tripleo-ci-centos-9-scenario002-standalone-master/7b0c1d2/logs/undercloud/var/log/containers/neutron/server.log.txt.gz

Revision history for this message
Sandeep Yadav (sandeepyadav93) wrote :

@jakob

The original report bug is solved with https://review.rdoproject.org/r/c/openstack/barbican-distgit/+/42876

Revision history for this message
Marios Andreou (marios-b) wrote :

Adding some missing context (tl;dr we are waiting for [5])

The test were added to skiplist with [1] which is why we see some green runs in the history at [2] e.g. latest green run @ [3].

The bug is fixed with [4] and we are now waiting for it to become available to our integration jobs so that we can finally merge [5] which will unskip these tests again

[1] https://review.opendev.org/c/openstack/openstack-tempest-skiplist/+/841834
[2] https://review.rdoproject.org/zuul/builds?job_name=periodic-tripleo-ci-centos-9-scenario002-standalone-master
[3] https://review.rdoproject.org/zuul/build/027c6481fb20417ba1de31a13f813117
[4] https://review.rdoproject.org/r/c/openstack/barbican-distgit/+/42876
[5] https://review.opendev.org/c/openstack/openstack-tempest-skiplist/+/841934

Revision history for this message
Marios Andreou (marios-b) wrote :

revert looks good test result @

         * https://logserver.rdoproject.org/46/28446/78/check/periodic-tripleo-ci-centos-9-scenario002-standalone-master/27ac973/logs/undercloud/var/log/tempest/tempest_run.log.txt.gz

        * {0} barbican_tempest_plugin.tests.scenario.test_image_signing.ImageSigningTest.test_signed_image_upload_and_boot [21.561331s] ... ok
{1} barbican_tempest_plugin.tests.scenario.test_image_signing.ImageSigningSnapshotTest.test_signed_image_upload_boot_snapshot [21.752059s] ... ok

merging https://review.opendev.org/c/openstack/openstack-tempest-skiplist/+/841934 and lets close it out

Changed in tripleo:
status: Triaged → Fix Released
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.