Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can mint be used to test other S3 compatible servers? #370

Open
fczuardi opened this issue Oct 2, 2023 · 4 comments
Open

Can mint be used to test other S3 compatible servers? #370

fczuardi opened this issue Oct 2, 2023 · 4 comments

Comments

@fczuardi
Copy link

fczuardi commented Oct 2, 2023

Hi,

I am new to this project and am interested in using mint to test an object storage server, since minIO implements amazon s3 apis I tought it would be possible to replace the endpoint and access keys environment variables and run the test suite against an AWS account. Would that work?

I don't know what I am missing, but after running the program I got 0/14 tests passed, and a bunch of buckets created on my AWS account. :(

Is there a documentation on how to do that, or a better place where I can discuss? The slack https://slack.min.io/ requires a @min.io email address to login, so I was not able to join.

image (17)

Thanks!!

@fczuardi
Copy link
Author

fczuardi commented Oct 2, 2023

example of output:

Running with                                                                                                                            
SERVER_ENDPOINT:      s3.us-east-2.amazonaws.com                                                                                        
ACCESS_KEY:           ...                                                                                              
SECRET_KEY:           ***REDACTED***                                                                                                    
ENABLE_HTTPS:         1                                                                                                                 
SERVER_REGION:        us-east-2                                                                                                         
MINT_DATA_DIR:        /mint/data                                                                                                        
MINT_MODE:            core                                                                                                              
ENABLE_VIRTUAL_STYLE: 0                                                                                                                 
RUN_ON_FAIL:          0                                                                                                                 
                                                                                                                                        
To get logs, run 'docker cp :/mint/log /tmp/mint-logs'                                                                                  
                                                                                                                                        
verify depth is 5                                                                                                                       
                                                                                                                                        
                                                                                                                                        
                                                                                                                                        
80EB77A3E07F0000:error:10000067:BIO routines:BIO_connect:connect error:../crypto/bio/bio_sock2.c:127:
80EB77A3E07F0000:error:8000006F:system library:BIO_connect:Connection refused:../crypto/bio/bio_sock2.c:125:calling connect()
80EB77A3E07F0000:error:10000067:BIO routines:BIO_connect:connect error:../crypto/bio/bio_sock2.c:127:
80EB77A3E07F0000:error:8000006F:system library:BIO_connect:Connection refused:../crypto/bio/bio_sock2.c:125:calling connect()
80EB77A3E07F0000:error:10000067:BIO routines:BIO_connect:connect error:../crypto/bio/bio_sock2.c:127:
80EB77A3E07F0000:error:8000006F:system library:BIO_connect:Connection refused:../crypto/bio/bio_sock2.c:125:calling connect()
80EB77A3E07F0000:error:10000067:BIO routines:BIO_connect:connect error:../crypto/bio/bio_sock2.c:127:
80EB77A3E07F0000:error:8000006F:system library:BIO_connect:Connection refused:../crypto/bio/bio_sock2.c:125:calling connect()
80EB77A3E07F0000:error:10000067:BIO routines:BIO_connect:connect error:../crypto/bio/bio_sock2.c:127:
80EB77A3E07F0000:error:8000006F:system library:BIO_connect:Connection refused:../crypto/bio/bio_sock2.c:125:calling connect()
80EB77A3E07F0000:error:10000067:BIO routines:BIO_connect:connect error:../crypto/bio/bio_sock2.c:127:
80EB77A3E07F0000:error:8000006F:system library:BIO_connect:Connection refused:../crypto/bio/bio_sock2.c:125:calling connect()
80EB77A3E07F0000:error:8000006F:system library:BIO_connect:Connection refused:../crypto/bio/bio_sock2.c:125:calling connect()  [147/694]
80EB77A3E07F0000:error:10000067:BIO routines:BIO_connect:connect error:../crypto/bio/bio_sock2.c:127:
80EB77A3E07F0000:error:8000006F:system library:BIO_connect:Connection refused:../crypto/bio/bio_sock2.c:125:calling connect()
80EB77A3E07F0000:error:10000067:BIO routines:BIO_connect:connect error:../crypto/bio/bio_sock2.c:127:
connect:errno=111
mv: cannot stat '*.pem': No such file or directory
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
(1/14) Running aws-sdk-go tests ... FAILED in 0 seconds
{
  "alert": "",
  "args": {
    "bucketName": "aws-sdk-go-test-3kgslx6nl9ymeg",
    "expiry": 60000000000,
    "objectName": "presignedTest"
  },
  "duration": 617,
  "error": "AuthorizationHeaderMalformed: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-east-2'\
n\tstatus code: 400, request id: V3K5E4B3CKY8R7HJ, host id: Ya29lJ18iwni+Qgxwm5UJrzWJNxfgOC+SPnrrko6MfkP1/kZMfJaUAtpoYjMIv5hJpImq/7HNkE=
",
  "function": "PresignedPut",
  "message": "AWS SDK Go CreateBucket Failed",
  "name": "aws-sdk-go",
  "status": "FAIL"
}
(1/14) Running aws-sdk-java tests ... FAILED in 2 seconds
{
  "alert": "",
  "args": {
    "bucketName": "aws-sdk-go-test-3kgslx6nl9ymeg",
    "expiry": 60000000000,
    "objectName": "presignedTest"
  },                                                                                                                           [116/694]
  "duration": 617,
  "error": "AuthorizationHeaderMalformed: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-east-2'\
n\tstatus code: 400, request id: V3K5E4B3CKY8R7HJ, host id: Ya29lJ18iwni+Qgxwm5UJrzWJNxfgOC+SPnrrko6MfkP1/kZMfJaUAtpoYjMIv5hJpImq/7HNkE=
",
  "function": "PresignedPut",
  "message": "AWS SDK Go CreateBucket Failed",
  "name": "aws-sdk-go",
  "status": "FAIL"
}
(1/14) Running aws-sdk-php tests ... FAILED in 7 seconds
{
  "name": "aws-sdk-php",
  "function": "headBucket ( array $params = [] )",
  "args": [
    "aws-sdk-php-651b141b866b2",
    "aws-sdk-php-651b141b866b3"
  ],
  "duration": "561",
  "status": "FAIL",
  "error": "Encountered a permanent redirect while requesting https://s3.us-east-2.amazonaws.com/mc-test-bucket-16133/. Are you sure you
 are using the correct region for this bucket?"
}
(1/14) Running aws-sdk-ruby tests ... FAILED in 26 seconds
{
  "name": "aws-sdk-ruby",
  "function": "presignedPut(bucket_name,file_name)",
  "args": {
    "bucket_name": "aws-sdk-ruby-bucket-9fd74a66a584",
    "file_name": "datafile-1-kB"
  },
  "duration": 2319.94,                                                                                                          [85/694]
  "error": "Expected to be created object does NOT exist",
  "status": "FAIL"
}
(1/14) Running awscli tests ... FAILED in 3 seconds
{
  "name": "awscli",
  "duration": 1574,
  "function": "make_bucket\n",
  "status": "FAIL",
  "error": "An error occurred (IllegalLocationConstraintException) when calling the CreateBucket operation: The unspecified location con
straint is incompatible for the region specific endpoint this request was sent to."
}
(1/14) Running healthcheck tests ... FAILED in 1 seconds
{
  "alert": "",
  "args": null,
  "duration": 431,
  "function": "testLivenessEndpoint",
  "message": "GET /minio/health/live returned 301 Moved Permanently",
  "name": "healthcheck",
  "status": "FAIL"
}
(1/14) Running mc tests ... FAILED in 3 seconds
{
  "name": "mc",
  "duration": "1482",
  "function": "test_make_bucket",
  "status": "FAIL",
  "error": "/mint/run/core/mc/mc --config-dir /tmp/.mc-30303 --quiet --no-color rb myminio/mc-test-bucket-29699  >>> \nmc: <ERROR> Unabl
e to validate target `myminio/mc-test-bucket-29699`. 301 Moved Permanently"
}                                                                                                                               [54/694]
(1/14) Running minio-go tests ... FAILED in 1 seconds
{
  "args": {
    "bucketName": "minio-go-test-vgtirf3syz43szjv"
  },
  "duration": 1209,
  "error": "301 Moved Permanently",
  "function": "BucketExists(bucketName)",
  "message": "BucketExists failed",
  "name": "minio-go: testFunctional",
  "status": "FAIL"
}
(1/14) Running minio-java tests ... FAILED in 19 seconds
{
  "name": "minio-java",
  "function": "getBucketEncryption()",
  "duration": 1327,
  "status": "FAIL",
  "error": "io.minio.errors.XmlParserException: org.simpleframework.xml.core.ElementException: Element 'BucketKeyEnabled' does not have 
a match in class io.minio.messages.SseConfigurationRule at line 2 >>> [io.minio.Xml.unmarshal(Xml.java:55), io.minio.MinioAsyncClient.la
mbda$getBucketEncryption$61(MinioAsyncClient.java:2794), java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFu
ture.java:642), java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506), java.base/java.util.concurren
t.CompletableFuture.complete(CompletableFuture.java:2073), io.minio.S3Base$1.onResponse(S3Base.java:559), okhttp3.internal.connection.Re
alCall$AsyncCall.run(RealCall.kt:519), java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128), java.b
ase/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628), java.base/java.lang.Thread.run(Thread.java:829)]"
}
(1/14) Running minio-js tests ... FAILED in 19 seconds
{
  "name": "minio-js",
  "function": "\"after all\" hook in \"functional tests\"",
  "duration": 503,                                                                                                              [23/694]
  "status": "FAIL",
  "error": "S3Error: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-east-2' at Object.parseError 
(minio-js/src/xml-parsers.js:37:11) at parser (minio-js/src/transformers.js:121:22) at Transform._flush (minio-js/src/transformers.js:51
:12) at Transform.prefinish (minio-js/node_modules/readable-stream/lib/_stream_transform.js:123:10) at Transform.emit (node:events:511:2
8) at prefinish (minio-js/node_modules/readable-stream/lib/_stream_writable.js:569:14) at finishMaybe (minio-js/node_modules/readable-st
ream/lib/_stream_writable.js:576:5) at endWritable (minio-js/node_modules/readable-stream/lib/_stream_writable.js:594:3) at Transform.Wr
itable.end (minio-js/node_modules/readable-stream/lib/_stream_writable.js:535:22) at IncomingMessage.onend (node:internal/streams/readab
le:713:10) at Object.onceWrapper (node:events:625:28) at IncomingMessage.emit (node:events:523:35) at endReadableNT (node:internal/strea
ms/readable:1367:12) at processTicksAndRejections (node:internal/process/task_queues:82:21)"
}
(1/14) Running minio-py tests ... FAILED in 1 minutes and 44 seconds
{
  "name": "minio-py:test_set_bucket_policy_readonly",
  "status": "FAIL",
  "args": {
    "bucket_name": "minio-py-test-520262e8-56a0-4c57-aea9-0b2f24d369a2"
  },
  "message": "S3 operation failed; code: AccessDenied, message: Access Denied, resource: None, request_id: RGZNS1MGJDVCFXCP, host_id: vj
P2ydjrnQ+BIIh2PP4R6AbVpEvsumJmEmSwdYUmjBM9i90VOabnNewWgAqceePIJ+d8BPdhLhA=",
  "error": "Traceback (most recent call last):\n  File \"/mint/run/core/minio-py/tests.py\", line 126, in _call_test\n    func(log_entry
, *args, **kwargs)\n  File \"/mint/run/core/minio-py/tests.py\", line 1713, in test_set_bucket_policy_readonly\n    _CLIENT.set_bucket_p
olicy(bucket_name, json.dumps(policy))\n  File \"/usr/local/lib/python3.10/dist-packages/minio/api.py\", line 723, in set_bucket_policy\
n    self._execute(\n  File \"/usr/local/lib/python3.10/dist-packages/minio/api.py\", line 408, in _execute\n    return self._url_open(\
n  File \"/usr/local/lib/python3.10/dist-packages/minio/api.py\", line 391, in _url_open\n    raise response_error\nminio.error.S3Error:
 S3 operation failed; code: AccessDenied, message: Access Denied, resource: None, request_id: RGZNS1MGJDVCFXCP, host_id: vjP2ydjrnQ+BIIh
2PP4R6AbVpEvsumJmEmSwdYUmjBM9i90VOabnNewWgAqceePIJ+d8BPdhLhA=\n",
  "duration": 1399
}
(1/14) Running s3cmd tests ... done in 1 minutes and 45 seconds
(2/14) Running s3select tests ... done in 1 minutes and 43 seconds
(3/14) Running versioning tests ... FAILED in 0 seconds
{
  "alert": "",
  "args": {
    "bucketName": "versioning-test-t029i65rjmcb9s"
  },
  "duration": 547,
  "error": "AuthorizationHeaderMalformed: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-east-2'\
n\tstatus code: 400, request id: 2EM52CCXSNK238KD, host id: 1N62MLFU0Qeb0vlyTMohZ/knrhVXnky02EpL15OBImYIhTNnMoD72+r22bCA0jCgIy6uGni7XXk=
",
  "function": "/mint/build/versioning/bucket.go:47: main.testMakeBucket",
  "message": "Versioning CreateBucket Failed",
  "name": "versioning",
  "status": "FAIL"
}

Executed 2 out of 14 tests successfully.

@harshavardhana
Copy link
Member

We require different region tests @fczuardi and with AWS S3 it is flaky since they are not strictly consistent about bucket creates and deletes.

mint is not written for AWS S3.

@fczuardi
Copy link
Author

fczuardi commented Oct 3, 2023

Hmm, ok, so at the moment Mint is mainly a test tool for MinIO only? Would patches to make it check other S3 implementations be welcome? Or do you know of other tools with that purpose?

@harshavardhana
Copy link
Member

Hmm, ok, so at the moment Mint is mainly a test tool for MinIO only? Would patches to make it check other S3 implementations be welcome? Or do you know of other tools with that purpose?

mint is mainly meant for MinIO, we do not really have the bandwidth for other vendors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants