Bug 1439917

Summary: Swift bucket X-Timestamp not set by Rados Gateway
Product: Red Hat Ceph Storage Reporter: Vikhyat Umrao <vumrao>
Component: RGWAssignee: Marcus Watts <mwatts>
Status: CLOSED ERRATA QA Contact: Tejas <tchandra>
Severity: high Docs Contact: Erin Donnelly <edonnell>
Priority: high    
Version: 2.2CC: cbodley, ceph-eng-bugs, edonnell, hnallurv, kbader, kdreyer, mbenjamin, mwatts, owasserm, sweil
Target Milestone: rcKeywords: Regression
Target Release: 2.3   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: RHEL: ceph-10.2.7-2.el7cp Ubuntu: ceph_10.2.7-3redhat1xenial Doc Type: Bug Fix
Doc Text:
.The Ceph Object Gateway provides valid time stamps for newly created objects Previously, the Ceph Object Gateway was storing 0 in the `x-timestamp` fields for all objects. This bug has been fixed, and newly created objects have the correct time stamps. Note that old objects will still retain the 0 time stamps.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-19 13:31:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1437916    

Description Vikhyat Umrao 2017-04-06 20:26:25 UTC
Description of problem:
Swift bucket X-Timestamp not set by Rados Gateway version jewel (Red Hat Ceph Storage 2.2 - 10.2.5-37.el7cp)

# swift post test-c5-osp8
# swift stat test-c5-osp8
                      Account: v1
                    Container: test-c5-osp8
                      Objects: 0
                        Bytes: 0
                     Read ACL:
                    Write ACL:
                      Sync To:
                     Sync Key:
                Accept-Ranges: bytes
             X-Storage-Policy: default-placement
X-Container-Bytes-Used-Actual: 0
                  X-Timestamp: 0.00000
                   X-Trans-Id: tx0000000000000000000e0-0058e69bb8-75623bc-default
                 Content-Type: text/plain; charset=utf-8



This is a regression because it is working perfectly fine with version hammer(Red Hat Ceph Storage 1.3.z - 0.94.5-9.el7cp).

The feature was added here: http://tracker.ceph.com/issues/10938

Version-Release number of selected component (if applicable):
Red Hat Ceph Storage 2.2 - 10.2.5-37.el7cp

How reproducible:
100%

Steps to Reproduce:
1. Create the container 
2. Run the stat

Comment 1 Vikhyat Umrao 2017-04-06 20:28:51 UTC
I have tested below combinations:

OSP 8 and OSP 10 with RHCS 2.2 - 10.2.5-37.el7cp
==================================================

OSP 8 - # swift --version
python-swiftclient 2.6.0
--------------------------------

# swift post test-c5-osp8
# swift stat test-c5-osp8
                      Account: v1
                    Container: test-c5-osp8
                      Objects: 0
                        Bytes: 0
                     Read ACL:
                    Write ACL:
                      Sync To:
                     Sync Key:
                Accept-Ranges: bytes
             X-Storage-Policy: default-placement
X-Container-Bytes-Used-Actual: 0
                  X-Timestamp: 0.00000
                   X-Trans-Id: tx0000000000000000000e0-0058e69bb8-75623bc-default
                 Content-Type: text/plain; charset=utf-8

OSP 10 - # swift --version
python-swiftclient 3.1.0
-----------------------------------

# swift post test-c5-osp-10
# swift stat test-c5-osp-10
                      Account: v1
                    Container: test-c5-osp-10
                      Objects: 0
                        Bytes: 0
                     Read ACL:
                    Write ACL:
                      Sync To:
                     Sync Key:
                Accept-Ranges: bytes
             X-Storage-Policy: default-placement
X-Container-Bytes-Used-Actual: 0
                  X-Timestamp: 0.00000
                   X-Trans-Id: tx000000000000000000013-0058e69ea6-77bd34e-default
                 Content-Type: text/plain; charset=utf-8

Plain SWIFT client without keystone:
----------------------------------------
[root@kilo1 ~]# swift -A http://kilo1.example.com/auth/1.0 -U testuser2:swift -K 'a7BmMdckQc3dyqbKapcbCw1mzD3EgTsc341L7OYF' post test-c5
[root@kilo1 ~]# swift -A http://kilo1.example.com/auth/1.0 -U testuser2:swift -K 'a7BmMdckQc3dyqbKapcbCw1mzD3EgTsc341L7OYF' stat test-c5
                      Account: v1
                    Container: test-c5
                      Objects: 0
                        Bytes: 0
                     Read ACL:
                    Write ACL:
                      Sync To:
                     Sync Key:
                Accept-Ranges: bytes
             X-Storage-Policy: default-placement
X-Container-Bytes-Used-Actual: 0
                  X-Timestamp: 0.00000
                   X-Trans-Id: tx0000000000000000000e5-0058e69f25-75623bc-default
                 Content-Type: text/plain; charset=utf-8


OSP 8 with RHCS 1.3.z - 0.94.5-9.el7cp
=================================

# swift post test-c1-osp8-rhcs-1.3.z
# swift stat test-c1-osp8-rhcs-1.3.z
                      Account: v1
                    Container: test-c1-osp8-rhcs-1.3.z
                      Objects: 0
                        Bytes: 0
                     Read ACL:
                    Write ACL:
                      Sync To:
                     Sync Key:
                Accept-Ranges: bytes
             X-Storage-Policy: default-placement
X-Container-Bytes-Used-Actual: 0
                  X-Timestamp: 1491509197.00000 <=================
                   X-Trans-Id: tx00000000000000000001b-0058e69fd4-1dc3a29-default
                 Content-Type: text/plain; charset=utf-8
[root@dell-per630-5 ~(keystone_admin)]# 

============

Comment 17 errata-xmlrpc 2017-06-19 13:31:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1497