[tempest] test_update_account_metadata_with_create_and_delete_metadata fails with 'matches Contains' error

Bug #1522358 reported by Anna Babich
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Status tracked in 10.0.x
10.0.x
Invalid
High
Oleksiy Butenko
8.0.x
Invalid
High
Oleksiy Butenko
9.x
Invalid
High
Oleksiy Butenko

Bug Description

Steps to reproduce:
    1. Deploy OpenStack cluster (please see Configuration section for more detailed information)
    2. Navigate to controller node
    3. Install git (use apt-get install git)
    4. Clone script to deploy rally + tempest
       # git clone https://github.com/obutenko/mos-rally-verify.git
    5. Navigate to the https://github.com/obutenko/mos-rally-verify
    6. Execute necessary steps to deploy tempest
    7. Tun test in debug mode
        #rally --debug verify start --regex tempest.api.object_storage.test_account_services.AccountTest.test_update_account_metadata_with_create_and_delete_metadata

Configuration:
    ISO: http://paste.openstack.org/show/495500/
    Compute - QEMU.
    Network - Neutron with VLAN segmentation, DVR.
    Storage Backends - Ceph RBD for volumes (Cinder), Ceph RBD for ephemeral volumes (Nova), Ceph RBD for images (Glance)
    RADOS
    Additional services - Install Ironic, Sahara

In tab Settings->Compute check Nova quotas

Nodes: controller, compute, ironic, ceph-osd

The subject's test fails on ISO #241 (ubuntu-vlan-ceph-swift configuration) with the trace given below:

02:40:02 tempest.api.object_storage.test_account_services.AccountTest.test_update_account_metadata_with_create_and_delete_metadata[id-8e5fc073-59b9-42ee-984a-29ed11b2c749]
02:40:02 Traceback (most recent call last):
02:40:02 testtools.testresult.real._StringException: Empty attachments:
02:40:02 pythonlogging:''
02:40:02 stderr
02:40:02 stdout
02:40:02
02:40:02 Traceback (most recent call last):
02:40:02 File "/home/developer/mos-tempest-runner/tempest/tempest/api/object_storage/test_account_services.py", line 313, in test_update_account_metadata_with_create_and_delete_metadata
02:40:02 self.assertNotIn('x-account-meta-test-account-meta1', resp)
02:40:02 File "/home/developer/mos-tempest-runner/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 394, in assertNotIn
02:40:02 self.assertThat(haystack, matcher, message)
02:40:02 File "/home/developer/mos-tempest-runner/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
02:40:02 raise mismatch_error
02:40:02 testtools.matchers._impl.MismatchError: {'status': '204', 'content-length': '0', 'x-account-meta-test-account-meta1': 'Meta1', 'x-account-meta-test-account-meta2': 'Meta2', 'x-account-object-count': '0', 'x-account-project-domain-id': 'default', 'x-account-storage-policy-policy-0-container-count': '6', 'x-account-storage-policy-policy-0-bytes-used': '0', 'connection': 'close', 'x-timestamp': '1449107512.49456', 'x-account-storage-policy-policy-0-object-count': '0', 'x-trans-id': 'tx986e9fbe3b514abe8ca94-00565fa03a', 'date': 'Thu, 03 Dec 2015 01:51:54 GMT', 'x-account-bytes-used': '0', 'x-account-container-count': '6', 'content-type': 'application/json; charset=utf-8', 'accept-ranges': 'bytes'} matches Contains('x-account-meta-test-account-meta1')

Changed in mos:
assignee: MOS Swift (mos-swift) → Alyona Kiseleva (akiselyova)
importance: Undecided → Medium
status: New → Confirmed
tags: added: tempest
Changed in mos:
milestone: 8.0 → 9.0
Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :

Important note: sometimes this test passed, the root of the issue is unknown.

Revision history for this message
Alyona Kiseleva (akiselyova) wrote :

Timur, yes, I haven't reproduced it yet, all my tests passed successfully. I'm trying to find some condition, which force it to fail.

Dmitry Pyzhov (dpyzhov)
tags: added: area-mos
tags: added: area-swift
removed: area-mos
tags: added: move-to-mu
Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

This only failed in 5% of runs for the last 30 days. Moving this to 8.0-updates, as we can't fix it in time for 8.0. We'll continue the investigation of the root cause.

Revision history for this message
Alyona Kiseleva (akiselyova) wrote :

Is it possible to see something like snapshot of system (or at least swift logs), where it'll fail next time? I'm trying to reproduce this, but it'll take too long time to get in this 5%.

Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :

Alyona, yes, we will provide the env when we reproduce it next time.

Revision history for this message
Alyona Kiseleva (akiselyova) wrote :

Any news here? I still have no env with this bug.

Revision history for this message
Sergii Turivnyi (sturivnyi) wrote :
Revision history for this message
Sergii Turivnyi (sturivnyi) wrote :
Revision history for this message
Sergii Turivnyi (sturivnyi) wrote :

Configuration:
    ISO: http://paste.openstack.org/show/495500/
    Compute - QEMU.
    Network - Neutron with VLAN segmentation, DVR.
    Storage Backends - Ceph RBD for volumes (Cinder), Ceph RBD for ephemeral volumes (Nova), Ceph RBD for images (Glance)
    RADOS
    Additional services - Install Ironic, Sahara

In tab Settings->Compute check Nova quotas

Nodes: controller, compute, ironic, ceph-osd

Steps to reproduce:
    1. Deploy ISO in configuration see (Detailed bug description)
    2. Navigate to controller node
    3. Install git (use apt-get install git)
    4. Clone script to deploy rally + tempest
       # git clone https://github.com/obutenko/mos-rally-verify.git
    5. Navigate to the https://github.com/obutenko/mos-rally-verify
    6. Execute necessary steps to deploy tempest
    7. Tun test in debug mode
        #rally --debug verify start --regex tempest.api.object_storage.test_account_services.AccountTest.test_update_account_metadata_with_create_and_delete_metadata

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Sergey, please take a look at the traceback you've attached: http://paste.openstack.org/show/495526/

Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
    2016-04-27 14:17:14,304 2190 INFO [tempest.lib.common.rest_client] Request (AccountTest:test_update_account_metadata_with_create_and_delete_metadata): 405 POST https://public.fuel.local:8080/swift/v1 0.016s
    2016-04-27 14:17:14,305 2190 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'X-Account-Meta-test-account-meta1': 'Meta1', 'X-Auth-Token': '<omitted>'}
            Body: None
        Response - Headers: {'status': '405', 'content-length': '16', 'content-location': 'https://public.fuel.local:8080/swift/v1', 'accept-ranges': 'bytes', 'server': 'Apache', 'connection': 'close', 'x-trans-id': 'tx000000000000000028f3a-005720c9ea-8597-default', 'date': 'Wed, 27 Apr 2016 14:17:14 GMT', 'content-type': 'text/plain; charset=utf-8'}
            Body: MethodNotAllowed

it clearly says that POST is not allowed to this particular URL: /swift/v1

and that's *correct* according to Swift docs (http://developer.openstack.org/api-ref-objectstorage-v1.html) - there is no such endpoint, thus Swift returns 405 for a reason.

Please check the test and its configuration: maybe you have broken string interpolation somewhere and the URL is produced incorrectly.

description: updated
description: updated
Revision history for this message
Radoslaw Zarzynski (rzarzynski) wrote :

It seems that someone is trying to reach an account through URL typical for RadosGW (https://public.fuel.local:8080/swift/v1) instead of a Swift-compatible one (https://public.fuel.local:8080/swift/v1/AUTH_$(tenant_id)s). At the moment RadosGW extracts the tenant_id from a token provided by a HTTP client. That's the reason why those URLs are different.

The question is: how has the URL been provided to Tempest? AFAIK Tempest should go to Keystone for endpoint locations.

Revision history for this message
Oleksiy Butenko (obutenko) wrote :

Change to Invalid
Can't reproduce this bug manual and on ci

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.