[SRU] Swift bucket X-Timestamp not set by Rados Gateway

Bug #1587261 reported by Benjamin Kaehne
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Invalid
Undecided
Unassigned
Declined for Newton by James Page
Mitaka
Fix Released
High
Unassigned
ceph (Ubuntu)
Fix Released
High
Frode Nordahl
Xenial
Fix Released
High
Unassigned
Yakkety
Fix Released
High
Unassigned
Zesty
Fix Released
High
Frode Nordahl

Bug Description

[Impact]

 * A basic characteristic of a object store is the ability to create
   buckets and objects and to query for information about said
   buckets and objects.

 * In the current version of the ceph radosgw package it is not
   possible to get creation time for buckets. This is a serious
   defect and makes it impossible to use Ubuntu with ceph as a
   object store for some applications.

 * The issue has been fixed in upstream master

 * The proposed debdiff solves the issue by including patches cherry
   picked and adapted from upstream master branch fixing this issue.

[Test Case]

 * Use Juju to deploy Ceph cluster with radosgw and relation to OpenStack
   Keystone. Example bundle: http://pastebin.ubuntu.com/23374308/

 * Install OpenStack Swift client

    sudo apt-get install python-swiftclient

 * Load OpenStack Credentials pointing to your test deployment

    wget https://raw.githubusercontent.com/openstack-charmers/openstack-bundles/master/development/shared/novarc
    . novarc

 * Create swift bucket

    swift post test

 * Display information about newly created bucket

    swift stat test

 * Observe that key 'X-Timestamp' has value 0.0

 * Delete bucket

    swift delete test

 * Install patched radosgw packages on 'ceph-radosgw' unit and repeat

 * Verify that key 'X-Timestamp' now has a value > 0.0 and corrensponding
   to the unixtime of when you created the bucket.

[Regression Potential]

 * The patch is simple and I see little potential for any regression as a
   result of it being applied.

[Original bug description]
When creating a swift/radosgw bucket in horizon the bucket gets created, but shows up with a creation date of 19700101

In the apache log one can observe

curl -i http://10.11.140.241:80/swift/v1/bucket1 -I -H "X-Auth-Token: ...
Container HEAD failed: http://10.11.140.241:80/swift/v1/bucket1 404 Not Found

However a manual curl call succeeds. Also the radosgw.log shows successful PUT/GET requests.

I get similar results using the swift command line utility with containers inheriting a creation date of 19700101 even though I can see the correct date being passed to rados in the headers of the request.

Also similarly issues with ceilometer intergration, similarly linked:

2016-05-31 06:28:16.931 1117922 WARNING ceilometer.agent.manager [-] Continue after error from storage.containers.objects: Account GET failed: http://10.101.140.241:80/swift/v1/AUTH_025d6aa2af18415a87c012211edb7fea?format=json 404 Not Found [first 60 chars of response] {"Code":"NoSuchBucket","BucketName":"AUTH_025d6aa2af18415a87
2016-05-31 06:28:16.931 1117922 ERROR ceilometer.agent.manager Traceback (most recent call last):

This is using charm version: 86 against Openstack Mitaka

This also seems pretty reproduceable with any ceph, ceph-rados and mitaka install via the juju charms.

summary: - Mitaka - Ceilometer-agent is unable to authenticate against the
- objectstore endpoint (rados-gw)
+ Mitaka - Issues authenticating against radosgw + bucket creation date of
+ 19700101
description: updated
Revision history for this message
Edward Hope-Morley (hopem) wrote : Re: Mitaka - Issues authenticating against radosgw + bucket creation date of 19700101

Hi Benjamin, i'm currently looking into the timestamp issue you have observed and will update this bug if/once i find anything. With regards to the "404 Not Found" in the logs, I think this is expected as I have seen the same behaviour with the swift when running with --debug so as to see headers and response. Basically when creating a resource the client first checks (GET) to see if it exists and if it does not (i.e. it gets a 404 Not Found) then it sends a new request to create the resource e.g. container/bucket.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Is the bug target i.e. ceilometer correct? It seems that the issue you are observing is a result of an issue with horizon rather than ceilometer since you created your container via the openstack-dashboard. I'll mark as openstack-dashboard for now.

Changed in ceilometer (Juju Charms Collection):
assignee: nobody → Edward Hope-Morley (hopem)
affects: ceilometer (Juju Charms Collection) → openstack-dashboard (Juju Charms Collection)
Changed in openstack-dashboard (Juju Charms Collection):
assignee: Edward Hope-Morley (hopem) → nobody
Revision history for this message
Edward Hope-Morley (hopem) wrote :

Benjamin, one last thing, could you tell me whether you are using the v2 or v3 keystone api? Specifically what is the api version in your client AUTH_URL and in radosgw ceph.conf.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

I have just tried creating a container using the swift cli tool and the openstack-dashboard (Trusty Mitaka) and both resulted in a timestamp of 0.00000. However, uploading objects to the container results in objects with a correct timestamp but still no timestamp on the container.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Same behaviour using python-openstackclient ...

Revision history for this message
Edward Hope-Morley (hopem) wrote :

This does appear to be a bug in the ceph rados gateway swift api code. My account and object timestamps appear to be working fine but not container timestamps. Support for Swift container X-Timestamp was added around the Infernalis timeframe [0] so it should definitely be working in Jewel.

[0] https://github.com/ceph/ceph/commit/b7e9bf6b98ee48d1977d907a9e5130c0ce073c54

summary: - Mitaka - Issues authenticating against radosgw + bucket creation date of
- 19700101
+ Swift container X-Timestamp unset by Rados Gateway
summary: - Swift container X-Timestamp unset by Rados Gateway
+ Swift container X-Timestamp not set by Rados Gateway
no longer affects: openstack-dashboard (Juju Charms Collection)
Revision history for this message
Frode Nordahl (fnordahl) wrote : Re: Swift container X-Timestamp not set by Rados Gateway

Just tested this on Xenial with radosgw-10.2.2-0ubuntu0.16.04.2 and can verify that Timestamp is not set on buckets/containers regardless of being created from swift CLI or horizon. (They are set for individual objects within said containers)

The commit you link to indeed does indicate that it should be fixed. I'll investigate further.

Frode Nordahl (fnordahl)
Changed in ceph (Ubuntu):
status: New → Confirmed
Frode Nordahl (fnordahl)
tags: added: sts
Frode Nordahl (fnordahl)
Changed in ceph (Ubuntu):
assignee: nobody → Frode Nordahl (fnordahl)
Frode Nordahl (fnordahl)
description: updated
summary: - Swift container X-Timestamp not set by Rados Gateway
+ [SRU] Swift container X-Timestamp not set by Rados Gateway
Frode Nordahl (fnordahl)
description: updated
Frode Nordahl (fnordahl)
description: updated
Frode Nordahl (fnordahl)
description: updated
summary: - [SRU] Swift container X-Timestamp not set by Rados Gateway
+ [SRU] Swift bucket X-Timestamp not set by Rados Gateway
Changed in ceph (Ubuntu Zesty):
status: Confirmed → In Progress
Frode Nordahl (fnordahl)
tags: added: sts-sru
Frode Nordahl (fnordahl)
description: updated
Revision history for this message
Louis Bouchard (louis) wrote :

wrong index in version

Frode Nordahl (fnordahl)
Changed in ceph (Ubuntu Zesty):
status: In Progress → Fix Released
Changed in ceph (Ubuntu Zesty):
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceph - 10.2.3-0ubuntu3

---------------
ceph (10.2.3-0ubuntu3) zesty; urgency=medium

  * rgw: Fixes for creation times for buckets (LP: #1587261).
    - d/p/rgw_rados-creation_time.patch: Backport fix from upstream master.
      - Fix logic error that leads to creation time being 0 instead of current
        time when creating buckets.

 -- Frode Nordahl <email address hidden> Wed, 26 Oct 2016 14:39:55 +0200

Changed in ceph (Ubuntu Zesty):
status: In Progress → Fix Released
James Page (james-page)
Changed in cloud-archive:
status: New → Invalid
Changed in ceph (Ubuntu Zesty):
importance: Undecided → High
Mathew Hodson (mhodson)
Changed in ceph (Ubuntu Xenial):
importance: Undecided → High
Changed in ceph (Ubuntu Yakkety):
importance: Undecided → High
Revision history for this message
Frode Nordahl (fnordahl) wrote :
Revision history for this message
James Page (james-page) wrote :

I'm picking up sponsorship of SRU updates

Revision history for this message
Frode Nordahl (fnordahl) wrote :
Revision history for this message
James Page (james-page) wrote :

I've uploaded the fixes for xenial and yakkety to the proposed queue for SRU team review.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Benjamin, or anyone else affected,

Accepted ceph into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ceph/10.2.3-0ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ceph (Ubuntu Yakkety):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Frode Nordahl (fnordahl) wrote :

I have verified that the package in yakkety-proposed works as intended and resolves the issue outlined in this bug report.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Benjamin, or anyone else affected,

Accepted ceph into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ceph/10.2.3-0ubuntu0.16.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ceph (Ubuntu Xenial):
status: New → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
tags: added: verification-done-yakkety
Revision history for this message
James Page (james-page) wrote :

$ swift stat test
                      Account: v1
                    Container: test
                      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: 1480328181.46989
                   X-Trans-Id: tx000000000000000000004-00583c03f9-37ae-default
                 Content-Type: text/plain; charset=utf-8

Revision history for this message
James Page (james-page) wrote :

xenial-proposed:

⟫ swift stat test
                      Account: v1
                    Container: test
                      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: 1480331952.17339
                   X-Trans-Id: tx000000000000000000003-00583c12b4-10c2-default
                 Content-Type: text/plain; charset=utf-

tags: added: verification-done
removed: verification-needed
Revision history for this message
James Page (james-page) wrote :

Hello Benjamin, or anyone else affected,

Accepted ceph into mitaka-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:mitaka-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-mitaka-needed to verification-mitaka-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-mitaka-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-mitaka-needed
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for ceph has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceph - 10.2.3-0ubuntu0.16.04.2

---------------
ceph (10.2.3-0ubuntu0.16.04.2) xenial; urgency=medium

  * rgw: Fixes for creation times for buckets (LP: #1587261):
    - d/p/rgw_rados-creation_time.patch: Backport fix from upstream master.
      Fix logic error that leads to creation time being 0 instead of current
      time when creating buckets.

ceph (10.2.3-0ubuntu0.16.04.1) xenial; urgency=medium

  * New upstream stable release (LP: #1628809).
    - d/p/*: Refresh.
    - d/p/rocksdb-flags.patch: Dropped, accepted upstream.
    - d/p/32bit-ftbfs.patch: Cherry pick fix for 32bit arch compat.
    - d/ceph-{fs-common,fuse}.install: Fix install locations
      for mount{.fuse}.ceph.
  * Limit the amount of data per chunk in omap push operations to 64k,
    ensuring that OSD threads don't hit timeouts during recovery
    operations (LP: #1628750):
    - d/p/osd-limit-omap-data-in-push-op.patch: Cherry pick fix from
      upstream master branch.

 -- Frode Nordahl <email address hidden> Fri, 28 Oct 2016 13:50:40 +0200

Changed in ceph (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceph - 10.2.3-0ubuntu2.1

---------------
ceph (10.2.3-0ubuntu2.1) yakkety; urgency=medium

  * rgw: Fixes for creation times for buckets (LP: #1587261).
    - d/p/rgw_rados-creation_time.patch: Backport fix from upstream master.
      Fix logic error that leads to creation time being 0 instead of current
      time when creating buckets.

ceph (10.2.3-0ubuntu2) yakkety; urgency=medium

  * d/control: Add Pre-Depends on ceph-common to ceph-osd to ensure
    that ceph user and group are created prior to unpacking of udev
    rules (LP: #1631328).
  * d/control: Drop surplus Recommends on ceph-common for ceph-mon, as
    it already has a in-direct Depends via ceph-base.

 -- Frode Nordahl <email address hidden> Fri, 28 Oct 2016 07:52:07 +0200

Changed in ceph (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Revision history for this message
Frode Nordahl (fnordahl) wrote :

$ juju ssh ceph-radosgw/0 dpkg -l radosgw
ii radosgw 10.2.2-0ubuntu0.16.04.2~clo amd64 $ swift post test
$ swift stat test
                      Account: v1
                    Container: test
                      Objects: 0
                        Bytes: 0
                     Read ACL:
                    Write ACL:
                      Sync To:
                     Sync Key:
                Accept-Ranges: bytes
                       Server: Apache/2.4.7 (Ubuntu)
X-Container-Bytes-Used-Actual: 0
                  X-Timestamp: 0.00000
                   X-Trans-Id: tx000000000000000000003-005846e2f9-10ce-default
             X-Storage-Policy: default-placement
                 Content-Type: text/plain; charset=utf-8
$ juju ssh ceph-radosgw/0 "sudo add-apt-repository cloud-archive:mitaka-proposed;sudo apt-get update;sudo apt-get -y dist-upgrade"
$ juju ssh ceph-radosgw/0 dpkg -l radosgw
ii radosgw 10.2.3-0ubuntu0.16.04.2~clo amd64
$ juju ssh ceph-radosgw/0 sudo shutdown -r now
$ swift post test_sru
$ swift stat test_sru
                      Account: v1
                    Container: test_sru
                      Objects: 0
                        Bytes: 0
                     Read ACL:
                    Write ACL:
                      Sync To:
                     Sync Key:
                Accept-Ranges: bytes
                       Server: Apache/2.4.7 (Ubuntu)
X-Container-Bytes-Used-Actual: 0
                  X-Timestamp: 1481041211.87247
                   X-Trans-Id: tx000000000000000000003-005846e541-10b2-default
             X-Storage-Policy: default-placement
                 Content-Type: text/plain; charset=utf-8

tags: added: verification-done-mitaka
removed: verification-mitaka-needed
Revision history for this message
James Page (james-page) wrote :

The verification of the Stable Release Update for ceph has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
James Page (james-page) wrote :

This bug was fixed in the package ceph - 10.2.3-0ubuntu0.16.04.2~cloud0
---------------

 ceph (10.2.3-0ubuntu0.16.04.2~cloud0) trusty-mitaka; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 ceph (10.2.3-0ubuntu0.16.04.2) xenial; urgency=medium
 .
   * rgw: Fixes for creation times for buckets (LP: #1587261):
     - d/p/rgw_rados-creation_time.patch: Backport fix from upstream master.
       Fix logic error that leads to creation time being 0 instead of current
       time when creating buckets.

Louis Bouchard (louis)
tags: added: sts-sru-done
removed: sts-sru
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.