Project

General

Profile

Bug #17803

rgw: usage statistics are broken for containers archiving versioned objects of Swift API

Added by Radoslaw Zarzynski about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Urgent
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
Yes
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

cver-store used in the listings is a container supposed to store non-current versions of objects belonging to a Swift's versioned container (one having X-Versions-Location: cver-store set). The issue occurs on fresh master.

$ curl -i "$publicURL/cver-store" -X GET -H "X-Auth-Token: $token"
HTTP/1.1 200 OK
Content-Length: 24
X-Timestamp: 1478320476.07422
X-Container-Object-Count: 1
X-Container-Bytes-Used: 0
X-Container-Bytes-Used-Actual: 0
X-Storage-Policy: default-placement
X-Trans-Id: tx0000000000000000002ed-00581d615f-1019-default
Accept-Ranges: bytes
Content-Type: text/plain; charset=utf-8
Date: Sat, 05 Nov 2016 04:34:39 GMT

003obj/1478320476.221333

However, 003obj/1478320476.221333 is exactly one byte long:

$ curl -i "$publicURL/cver-store/003obj/1478320476.221333" -X GET -H "X-Auth-Token: $token"
HTTP/1.1 200 OK
Content-Length: 1
Accept-Ranges: bytes
Last-Modified: Sat, 05 Nov 2016 04:34:36 GMT
X-Timestamp: 1478320476.28858
etag: c4ca4238a0b923820dcc509a6f75849b
X-Trans-Id: tx0000000000000000002ef-00581d621d-1019-default
Content-Type: application/x-www-form-urlencoded
Date: Sat, 05 Nov 2016 04:37:49 GMT

1

This inconsistency leads to failure of the Tempest's test for object versioning:

======================================================================
FAIL: tempest.api.object_storage.test_object_version.ContainerTest.test_versioned_container[gate,smoke]
tags: worker-0
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "/work/tempest/tempest/api/object_storage/test_object_version.py", line 84, in test_versioned_container
    vers_container_name)
  File "/work/tempest/tempest/api/object_storage/test_object_version.py", line 43, in assertContainer
    self.assertEqual(header_value, byte)
  File "/home/adam/.local/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/adam/.local/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: '0' != '1'
2016-11-05 05:25:17.772 6729 ERROR tempest.test [-] teardown of resources failed: An object with that identifier already exists
Details: An object with that identifier already exists
Details: {u'HostId': u'1019-default-default', u'Code': u'BucketNotEmpty', u'BucketName': u'TestBaseContainer-468048365', u'RequestId': u'tx0000000000000000002e1-00581d5f2d-1019-default'}
2016-11-05 05:25:17.772 6729 TRACE tempest.test Traceback (most recent call last):
2016-11-05 05:25:17.772 6729 TRACE tempest.test   File "/work/tempest/tempest/test.py", line 269, in tearDownClass
2016-11-05 05:25:17.772 6729 TRACE tempest.test     teardown()
2016-11-05 05:25:17.772 6729 TRACE tempest.test   File "/work/tempest/tempest/api/object_storage/test_object_version.py", line 34, in resource_cleanup
2016-11-05 05:25:17.772 6729 TRACE tempest.test     cls.delete_containers(cls.containers)
2016-11-05 05:25:17.772 6729 TRACE tempest.test   File "/work/tempest/tempest/api/object_storage/base.py", line 98, in delete_containers
2016-11-05 05:25:17.772 6729 TRACE tempest.test     container_client.delete_container(cont)
2016-11-05 05:25:17.772 6729 TRACE tempest.test   File "/work/tempest/tempest/services/object_storage/container_client.py", line 52, in delete_container
2016-11-05 05:25:17.772 6729 TRACE tempest.test     resp, body = self.delete(url)
2016-11-05 05:25:17.772 6729 TRACE tempest.test   File "/home/adam/.local/lib/python2.7/site-packages/tempest_lib/common/rest_client.py", line 283, in delete
2016-11-05 05:25:17.772 6729 TRACE tempest.test     return self.request('DELETE', url, extra_headers, headers, body)
2016-11-05 05:25:17.772 6729 TRACE tempest.test   File "/work/tempest/tempest/common/service_client.py", line 69, in request
2016-11-05 05:25:17.772 6729 TRACE tempest.test     raise exceptions.Conflict(ex)
2016-11-05 05:25:17.772 6729 TRACE tempest.test Conflict: An object with that identifier already exists
2016-11-05 05:25:17.772 6729 TRACE tempest.test Details: An object with that identifier already exists
2016-11-05 05:25:17.772 6729 TRACE tempest.test Details: {u'HostId': u'1019-default-default', u'Code': u'BucketNotEmpty', u'BucketName': u'TestBaseContainer-468048365', u'RequestId': u'tx0000000000000000002e1-00581d5f2d-1019-default'}
2016-11-05 05:25:17.772 6729 TRACE tempest.test 
======================================================================
FAIL: tearDownClass (tempest.api.object_storage.test_object_version.ContainerTest)
tags: worker-0
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/work/tempest/tempest/test.py", line 269, in tearDownClass
    teardown()
  File "/work/tempest/tempest/api/object_storage/test_object_version.py", line 34, in resource_cleanup
    cls.delete_containers(cls.containers)
  File "/work/tempest/tempest/api/object_storage/base.py", line 98, in delete_containers
    container_client.delete_container(cont)
  File "/work/tempest/tempest/services/object_storage/container_client.py", line 52, in delete_container
    resp, body = self.delete(url)
  File "/home/adam/.local/lib/python2.7/site-packages/tempest_lib/common/rest_client.py", line 283, in delete
    return self.request('DELETE', url, extra_headers, headers, body)
  File "/work/tempest/tempest/common/service_client.py", line 69, in request
    raise exceptions.Conflict(ex)
tempest.exceptions.Conflict: An object with that identifier already exists
Details: An object with that identifier already exists
Details: {u'HostId': u'1019-default-default', u'Code': u'BucketNotEmpty', u'BucketName': u'TestBaseContainer-468048365', u'RequestId': u'tx0000000000000000002e1-00581d5f2d-1019-default'}

History

#1 Updated by Radoslaw Zarzynski about 6 years ago

  • Status changed from New to In Progress
  • Assignee set to Radoslaw Zarzynski
  • Priority changed from Normal to Urgent

Urgent because the failed test is a part of RefStack.

#2 Updated by Radoslaw Zarzynski about 6 years ago

  • Status changed from In Progress to Fix Under Review

#3 Updated by Orit Wasserman about 6 years ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF