Project

General

Profile

Actions

Feature #984

open

rgw: user logging API

Added by Anonymous about 13 years ago. Updated over 6 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)
Actions

Also available in: Atom PDF