Project

General

Profile

Feature #984

rgw: user logging API

Added by Anonymous almost 12 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

from s3-tests:

def test_logging_toggle():
    bucket = get_new_bucket()
    log_bucket = s3.main.create_bucket(bucket.name + '-log')
    log_bucket.set_as_logging_target()
    bucket.enable_logging(target_bucket=log_bucket, target_prefix=bucket.name)
    bucket.disable_logging()

$ S3TEST_CONF=tv.conf ./virtualenv/bin/nosetests test_s3:test_logging_toggle
E
======================================================================
ERROR: test_s3.test_logging_toggle
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tv/src/s3-tests.git/virtualenv/lib/python2.6/site-packages/nose/case.py", line 187, in runTest
    self.test(*self.arg)
  File "/home/tv/src/s3-tests.git/test_s3.py", line 557, in test_logging_toggle
    log_bucket.set_as_logging_target()
  File "/home/tv/src/s3-tests.git/virtualenv/lib/python2.6/site-packages/boto/s3/bucket.py", line 749, in set_as_logging_target
    self.set_acl(policy, headers=headers)
  File "/home/tv/src/s3-tests.git/virtualenv/lib/python2.6/site-packages/boto/s3/bucket.py", line 586, in set_acl
    headers, version_id)
  File "/home/tv/src/s3-tests.git/virtualenv/lib/python2.6/site-packages/boto/s3/bucket.py", line 581, in set_xml_acl
    response.status, response.reason, body)
S3ResponseError: S3ResponseError: 403 Forbidden
<?xml version="1.0" encoding="UTF-8"?><Error><Code>AccessDenied</Code></Error>
-------------------- >> begin captured logging << --------------------
boto: DEBUG: path=/
boto: DEBUG: auth_path=/
boto: DEBUG: Canonical: GET

Tue, 05 Apr 2011 17:48:29 GMT
/
boto: DEBUG: Method: GET
boto: DEBUG: Path: /
boto: DEBUG: Data: 
boto: DEBUG: Headers: {'Date': 'Tue, 05 Apr 2011 17:48:29 GMT', 'Content-Length': '0', 'Authorization': 'AWS TKKZ1DX83O7ZCTWHE0YD:ozpyUFTu46cLPMAzqxNmtpqxnTA=', 'User-Agent': 'Boto/2.0b4 (linux2)'}
boto: DEBUG: Host: localhost:7280
boto: DEBUG: establishing HTTP connection
boto: DEBUG: path=/
boto: DEBUG: auth_path=/
boto: DEBUG: Canonical: GET

Tue, 05 Apr 2011 17:48:29 GMT
/
boto: DEBUG: Method: GET
boto: DEBUG: Path: /
boto: DEBUG: Data: 
boto: DEBUG: Headers: {'Date': 'Tue, 05 Apr 2011 17:48:29 GMT', 'Content-Length': '0', 'Authorization': 'AWS O54XVCC9MQ9Q72TWP5Y1:Zm89VSN6M8qDhkW4gamK6PXYolU=', 'User-Agent': 'Boto/2.0b4 (linux2)'}
boto: DEBUG: Host: localhost:7280
boto: DEBUG: establishing HTTP connection
boto: DEBUG: path=/test-tv-xtepuoh62trj8qevlj2bm-1/
boto: DEBUG: auth_path=/test-tv-xtepuoh62trj8qevlj2bm-1/
boto: DEBUG: Canonical: PUT

Tue, 05 Apr 2011 17:48:29 GMT
/test-tv-xtepuoh62trj8qevlj2bm-1/
boto: DEBUG: Method: PUT
boto: DEBUG: Path: /test-tv-xtepuoh62trj8qevlj2bm-1/
boto: DEBUG: Data: 
boto: DEBUG: Headers: {'Date': 'Tue, 05 Apr 2011 17:48:29 GMT', 'Content-Length': '0', 'Authorization': 'AWS O54XVCC9MQ9Q72TWP5Y1:P1Xnh+4Ffqh4sg5icVUt4EttGNQ=', 'User-Agent': 'Boto/2.0b4 (linux2)'}
boto: DEBUG: Host: localhost:7280
boto: DEBUG: path=/test-tv-xtepuoh62trj8qevlj2bm-1-log/
boto: DEBUG: auth_path=/test-tv-xtepuoh62trj8qevlj2bm-1-log/
boto: DEBUG: Canonical: PUT

Tue, 05 Apr 2011 17:48:30 GMT
/test-tv-xtepuoh62trj8qevlj2bm-1-log/
boto: DEBUG: Method: PUT
boto: DEBUG: Path: /test-tv-xtepuoh62trj8qevlj2bm-1-log/
boto: DEBUG: Data: 
boto: DEBUG: Headers: {'Date': 'Tue, 05 Apr 2011 17:48:30 GMT', 'Content-Length': '0', 'Authorization': 'AWS O54XVCC9MQ9Q72TWP5Y1:I0o9IElpN9ioU4Tpd5r40YUZUqE=', 'User-Agent': 'Boto/2.0b4 (linux2)'}
boto: DEBUG: Host: localhost:7280
boto: DEBUG: path=/test-tv-xtepuoh62trj8qevlj2bm-1-log/
boto: DEBUG: auth_path=/test-tv-xtepuoh62trj8qevlj2bm-1-log/
boto: DEBUG: path=/test-tv-xtepuoh62trj8qevlj2bm-1-log/?acl
boto: DEBUG: auth_path=/test-tv-xtepuoh62trj8qevlj2bm-1-log/?acl
boto: DEBUG: Canonical: GET

Tue, 05 Apr 2011 17:48:32 GMT
/test-tv-xtepuoh62trj8qevlj2bm-1-log/?acl
boto: DEBUG: Method: GET
boto: DEBUG: Path: /test-tv-xtepuoh62trj8qevlj2bm-1-log/?acl
boto: DEBUG: Data: 
boto: DEBUG: Headers: {'Date': 'Tue, 05 Apr 2011 17:48:32 GMT', 'Content-Length': '0', 'Authorization': 'AWS O54XVCC9MQ9Q72TWP5Y1:xcsbtvdMiWpb7GXQnv8R25+SMk0=', 'User-Agent': 'Boto/2.0b4 (linux2)'}
boto: DEBUG: Host: localhost:7280
boto: DEBUG: path=/test-tv-xtepuoh62trj8qevlj2bm-1-log/
boto: DEBUG: auth_path=/test-tv-xtepuoh62trj8qevlj2bm-1-log/
boto: DEBUG: path=/test-tv-xtepuoh62trj8qevlj2bm-1-log/?acl
boto: DEBUG: auth_path=/test-tv-xtepuoh62trj8qevlj2bm-1-log/?acl
boto: DEBUG: Canonical: PUT

Tue, 05 Apr 2011 17:48:33 GMT
/test-tv-xtepuoh62trj8qevlj2bm-1-log/?acl
boto: DEBUG: Method: PUT
boto: DEBUG: Path: /test-tv-xtepuoh62trj8qevlj2bm-1-log/?acl
boto: DEBUG: Data: <AccessControlPolicy><Owner><ID>O54XVCC9MQ9Q72TWP5Y1</ID><DisplayName>Mr. Foo</DisplayName></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>O54XVCC9MQ9Q72TWP5Y1</ID><DisplayName>Mr. Foo</DisplayName></Grantee><Permission>FULL_CONTROL</Permission></Grant><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI>http://acs.amazonaws.com/groups/s3/LogDelivery</URI></Grantee><Permission>WRITE</Permission></Grant><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI>http://acs.amazonaws.com/groups/s3/LogDelivery</URI></Grantee><Permission>READ_ACP</Permission></Grant></AccessControlList></AccessControlPolicy>
boto: DEBUG: Headers: {'Date': 'Tue, 05 Apr 2011 17:48:33 GMT', 'Content-Length': '760', 'Authorization': 'AWS O54XVCC9MQ9Q72TWP5Y1:JvJi9jNX5qlDGDrYuXlR6t+zJCM=', 'User-Agent': 'Boto/2.0b4 (linux2)'}
boto: DEBUG: Host: localhost:7280
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 1 test in 8.280s

FAILED (errors=1)

History

#1 Updated by Sage Weil almost 12 years ago

  • Target version set to v0.28

#2 Updated by Sage Weil almost 12 years ago

  • translation missing: en.field_position set to 4

#3 Updated by Sage Weil almost 12 years ago

  • Target version deleted (v0.28)
  • translation missing: en.field_position deleted (8)
  • translation missing: en.field_position set to 1
  • translation missing: en.field_position changed from 1 to 633

#4 Updated by Sage Weil over 11 years ago

  • Subject changed from radosgw bucket.set_as_logging_target() gives 403 Forbidden to rgw: bucket.set_as_logging_target() gives 403 Forbidden
  • Target version set to v0.33

#5 Updated by Sage Weil over 11 years ago

  • translation missing: en.field_position deleted (712)
  • translation missing: en.field_position set to 24

#6 Updated by Sage Weil over 11 years ago

  • Target version changed from v0.33 to v0.34

#7 Updated by Sage Weil over 11 years ago

  • Target version deleted (v0.34)
  • translation missing: en.field_position deleted (54)
  • translation missing: en.field_position set to 1
  • translation missing: en.field_position changed from 1 to 804

#8 Updated by Sage Weil over 11 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from rgw: bucket.set_as_logging_target() gives 403 Forbidden to rgw: user logging API
  • Target version set to 12

#9 Updated by Sage Weil over 11 years ago

  • Target version deleted (12)

#10 Updated by Sage Weil over 10 years ago

  • translation missing: en.field_position deleted (1200)
  • translation missing: en.field_position set to 284

#11 Updated by Anonymous over 10 years ago

  • Project changed from Ceph to rgw
  • Category deleted (22)

#12 Updated by Yehuda Sadeh over 10 years ago

  • translation missing: en.field_position deleted (294)
  • translation missing: en.field_position set to 305

#13 Updated by Yehuda Sadeh over 10 years ago

  • Target version set to v0.53a
  • translation missing: en.field_position deleted (313)
  • translation missing: en.field_position set to 3

#14 Updated by Yehuda Sadeh over 10 years ago

  • Target version changed from v0.53a to v0.53b
  • translation missing: en.field_position deleted (8)
  • translation missing: en.field_position set to 6

#15 Updated by Yehuda Sadeh over 10 years ago

  • translation missing: en.field_story_points set to 8
  • translation missing: en.field_position deleted (6)
  • translation missing: en.field_position set to 4

#16 Updated by Yehuda Sadeh over 10 years ago

  • Target version deleted (v0.53b)
  • translation missing: en.field_position deleted (5)
  • translation missing: en.field_position set to 1

#17 Updated by Lenz Grimmer over 7 years ago

Is this related to Amazon's Server Access Logging as documented in http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html ?
Having a way to define a "log bucket" would be very useful. Are there any plans to implement this at some point?

#18 Updated by Enming Zhang over 5 years ago

This test case is no longer necessary.

As we have implemented the RGW Bucket Logging in https://github.com/ceph/ceph/pull/14841
and I have added some related s3-tests test cases in https://github.com/ceph/s3-tests/pull/161

This test case has been covered in my PR

Also available in: Atom PDF