Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1614552

Summary: s3test.py script needs further testing (2.6. Testing the Object Gateway)
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: John Brier <jbrier>
Component: DocumentationAssignee: ceph-docs <ceph-docs>
Status: CLOSED DUPLICATE QA Contact: Tejas <tchandra>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.1CC: jowilkin, kdreyer, tchandra
Target Milestone: z1   
Target Release: 3.2   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-21 17:09:01 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:
Embargoed:

Description John Brier 2018-08-09 21:37:09 UTC
Description of problem:

After trying to run the s3 python test script I ran into errors. We need to fully verfify this section. I wasn't able to set up a DNS wildcard as suggested in section 2.4, so that may be the issue, but it might not be, either.


Version-Release number of selected component (if applicable):

https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/3/html-single/object_gateway_guide_for_red_hat_enterprise_linux/#testing_s3_access



Steps to Reproduce:

[root@jb-rhel-rgw ~]# cat s3test.py 
import boto
import boto.s3.connection

access_key = "PB14YL1IRALCY83AVWGB"
secret_key = "UCbf8laZVrbTV18T3TBofIMXynEQCxez2ju1GUpJ"

boto.config.add_section('s3')
boto.config.set('s3', 'use-sigv4', 'True')

conn = boto.connect_s3(
        aws_access_key_id = access_key,
        aws_secret_access_key = secret_key,
        host = 's3.default.jb-rhel-rgw',
        port = 7480,
        is_secure=False,
        calling_format = boto.s3.connection.OrdinaryCallingFormat(),
        )

bucket = conn.create_bucket('my-new-bucket')
for bucket in conn.get_all_buckets():
	print "{name}\t{created}".format(
		name = bucket.name,
		created = bucket.creation_date,
)
[root@jb-rhel-rgw ~]# python s3test.py 
Traceback (most recent call last):
  File "s3test.py", line 19, in <module>
    bucket = conn.create_bucket('my-new-bucket')
  File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 612, in create_bucket
    data=data)
  File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 664, in make_request
    retry_handler=retry_handler
  File "/usr/lib/python2.7/site-packages/boto/connection.py", line 1068, in make_request
    retry_handler=retry_handler)
  File "/usr/lib/python2.7/site-packages/boto/connection.py", line 927, in _mexe
    request.authorize(connection=self)
  File "/usr/lib/python2.7/site-packages/boto/connection.py", line 377, in authorize
    connection._auth_handler.add_auth(self, **kwargs)
  File "/usr/lib/python2.7/site-packages/boto/auth.py", line 709, in add_auth
    **kwargs)
  File "/usr/lib/python2.7/site-packages/boto/auth.py", line 526, in add_auth
    canonical_request = self.canonical_request(req)
  File "/usr/lib/python2.7/site-packages/boto/auth.py", line 402, in canonical_request
    cr.append(self.canonical_headers(headers_to_sign) + '\n')
  File "/usr/lib/python2.7/site-packages/boto/auth.py", line 363, in canonical_headers
    if '"' in raw_value:
TypeError: argument of type 'int' is not iterable
[root@jb-rhel-rgw ~]# radosgw
radosgw                 radosgw-es              radosgw-token           
radosgw-admin           radosgw-object-expirer

Comment 3 John Brier 2019-01-21 17:09:01 UTC
Closing this because the problem is RGW is configured to listen on port 8080 when Ceph is installed using Ansible. s3test.py works fine when you set 'port = 8080'. The docs need to say to use port 8080 instead. This is being addressed in bug 1503034.

*** This bug has been marked as a duplicate of bug 1503034 ***