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

isServerResolvable its sufficient to check server is reachable #11609

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

harshavardhana
Copy link
Member

Description

isServerResolvable its sufficient to check server is reachable

Motivation and Context

using isServerResolvable for expiration can lead to chicken
and egg problems, a lock might expire knowingly when server
is booting up causing perpetual locks getting expired.

How to test this PR?

harder to reproduce but it's possible in sufficiently slower setups

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Documentation updated
  • Unit tests added/updated

using isServerResolvable for expiration can lead to chicken
and egg problems, a lock might expire knowingly when server
is booting up causing perpetual locks getting expired.
@minio-trusted
Copy link
Contributor

Mint Automation

Test Result
mint-large-bucket.sh ✔️
mint-fs.sh ✔️
mint-gateway-s3.sh ✔️
mint-erasure.sh ✔️
mint-dist-erasure.sh ✔️
mint-gateway-nas.sh ✔️
mint-zoned.sh more...
mint-compress-encrypt-dist-erasure.sh more...

11609-fc55652/mint-zoned.sh.log:

Running with
SERVER_ENDPOINT:      minio-dev7.minio.io:32162
ACCESS_KEY:           minio
SECRET_KEY:           ***REDACTED***
ENABLE_HTTPS:         0
SERVER_REGION:        us-east-1
MINT_DATA_DIR:        /mint/data
MINT_MODE:            full
ENABLE_VIRTUAL_STYLE: 0

To get logs, run 'docker cp eb587be57717:/mint/log /tmp/mint-logs'

(1/15) Running aws-sdk-go tests ... done in 1 seconds
(2/15) Running aws-sdk-java tests ... done in 2 seconds
(3/15) Running aws-sdk-php tests ... done in 43 seconds
(4/15) Running aws-sdk-ruby tests ... done in 4 seconds
(5/15) Running awscli tests ... done in 2 minutes and 19 seconds
(6/15) Running healthcheck tests ... done in 0 seconds
(7/15) Running mc tests ... done in 1 minutes and 2 seconds
(8/15) Running minio-dotnet tests ... done in 55 seconds
(9/15) Running minio-go tests ... done in 1 minutes and 57 seconds
(10/15) Running minio-java tests ... FAILED in 1 minutes and 23 seconds
{
  "name": "minio-java",
  "function": "listObjects()",
  "args": "[bucket, prefix, recursive, 1050 objects]",
  "duration": 69617,
  "status": "FAIL",
  "error": "error occurred\nErrorResponse(code = SlowDown, message = Please reduce your request, bucketName = minio-java-test-addbf5, objectName = null, resource = /minio-java-test-addbf5, requestId = 166633C2EEB96EA7, hostId = 133636aa-882b-4a54-a6a4-e54b23830afc)\nrequest={method=DELETE, url=http://minio-dev7.minio.io:32162/minio-java-test-addbf5, headers=Host: minio-dev7.minio.io:32162\nAccept-Encoding: identity\nUser-Agent: MinIO (Linux; amd64) minio-java/8.0.3\nContent-MD5: 1B2M2Y8AsgTpgAmY7PhCfg==\nx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\nx-amz-date: 20210222T225348Z\nAuthorization: AWS4-HMAC-SHA256 Credential=*REDACTED*/20210222/us-east-1/s3/aws4_request, SignedHeaders=content-md5;host;x-amz-content-sha256;x-amz-date, Signature=*REDACTED*\n}\nresponse={code=503, headers=Accept-Ranges: bytes\nContent-Length: 303\nContent-Security-Policy: block-all-mixed-content\nContent-Type: application/xml\nRetry-After: 120\nServer: MinIO\nVary: Origin\nX-Amz-Request-Id: 166633C2EEB96EA7\nX-Xss-Protection: 1; mode=block\nDate: Mon, 22 Feb 2021 22:53:48 GMT\n}\n >>> [io.minio.MinioClient.execute(MinioClient.java:775), io.minio.MinioClient.execute(MinioClient.java:563), io.minio.MinioClient.executeDelete(MinioClient.java:879), io.minio.MinioClient.removeBucket(MinioClient.java:2669), FunctionalTest.testListObjects(FunctionalTest.java:1416), FunctionalTest.listObjects(FunctionalTest.java:1455), FunctionalTest.runObjectTests(FunctionalTest.java:3747), FunctionalTest.runTests(FunctionalTest.java:3783), FunctionalTest.main(FunctionalTest.java:3927)]"
}
(10/15) Running minio-js tests ... done in 52 seconds
(11/15) Running minio-py tests ... FAILED in 3 minutes and 53 seconds
{
  "name": "minio-py:test_list_objects_with_1001_files",
  "status": "FAIL",
  "args": {
    "bucket_name": "minio-py-test-a7a4dd0a-9543-400a-bdc2-b86877308cab",
    "object_name": "fc8555d5-88d1-4182-ab84-e94268ad8c63_0 ~ fc8555d5-88d1-4182-ab84-e94268ad8c63_1000"
  },
  "message": "S3 operation failed; code: BucketNotEmpty, message: The bucket you tried to delete is not empty, resource: /minio-py-test-a7a4dd0a-9543-400a-bdc2-b86877308cab, request_id: 1666340528CFDF4D, host_id: 133636aa-882b-4a54-a6a4-e54b23830afc, bucket_name: minio-py-test-a7a4dd0a-9543-400a-bdc2-b86877308cab",
  "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 1248, in test_list_objects_with_1001_files\n    _CLIENT.remove_bucket(bucket_name)\n  File \"/usr/local/lib/python3.6/dist-packages/minio/api.py\", line 676, in remove_bucket\n    self._execute(\"DELETE\", bucket_name)\n  File \"/usr/local/lib/python3.6/dist-packages/minio/api.py\", line 409, in _execute\n    preload_content=preload_content,\n  File \"/usr/local/lib/python3.6/dist-packages/minio/api.py\", line 385, in _url_open\n    raise response_error\nminio.error.S3Error: S3 operation failed; code: BucketNotEmpty, message: The bucket you tried to delete is not empty, resource: /minio-py-test-a7a4dd0a-9543-400a-bdc2-b86877308cab, request_id: 1666340528CFDF4D, host_id: 133636aa-882b-4a54-a6a4-e54b23830afc, bucket_name: minio-py-test-a7a4dd0a-9543-400a-bdc2-b86877308cab\n",
  "duration": 178712
}
(11/15) Running s3cmd tests ... done in 18 seconds
(12/15) Running s3select tests ... done in 10 seconds
(13/15) Running security tests ... done in 0 seconds

Executed 13 out of 15 tests successfully.

11609-fc55652/mint-compress-encrypt-dist-erasure.sh.log:

Running with
SERVER_ENDPOINT:      minio-dev6.minio.io:32349
ACCESS_KEY:           minio
SECRET_KEY:           ***REDACTED***
ENABLE_HTTPS:         0
SERVER_REGION:        us-east-1
MINT_DATA_DIR:        /mint/data
MINT_MODE:            full
ENABLE_VIRTUAL_STYLE: 0

To get logs, run 'docker cp 57496c8e51d1:/mint/log /tmp/mint-logs'

(1/15) Running aws-sdk-go tests ... done in 2 seconds
(2/15) Running aws-sdk-java tests ... done in 1 seconds
(3/15) Running aws-sdk-php tests ... done in 48 seconds
(4/15) Running aws-sdk-ruby tests ... done in 3 seconds
(5/15) Running awscli tests ... FAILED in 34 seconds
{
  "name": "awscli",
  "duration": 2886,
  "function": "aws --endpoint-url http://minio-dev6.minio.io:32349 s3api copy-object --bucket awscli-mint-test-bucket-23847 --key datafile-1-kB-copy --copy-source awscli-mint-test-bucket-23847/datafile-1-kB\n",
  "status": "FAIL",
  "error": "Hash mismatch expected 084e1383b70fb0c51acc680fef370023, got ac57de7156d7fc25ac1a65f81fa3989b"
}
(5/15) Running healthcheck tests ... done in 0 seconds
(6/15) Running mc tests ... done in 49 seconds
(7/15) Running minio-dotnet tests ... done in 48 seconds
(8/15) Running minio-go tests ... FAILED in 2 minutes and 27 seconds
{
  "args": {
    "destination": {
      "Bucket": "minio-go-test-95jk6eovhgog2yil",
      "Object": "dstObject",
      "Encryption": {},
      "UserMetadata": null,
      "ReplaceMetadata": false,
      "UserTags": null,
      "ReplaceTags": false,
      "LegalHold": "",
      "Mode": "",
      "RetainUntilDate": "0001-01-01T00:00:00Z",
      "Size": 0,
      "Progress": null
    },
    "source": {
      "Bucket": "minio-go-test-95jk6eovhgog2yil",
      "Object": "srcObject",
      "VersionID": "",
      "MatchETag": "",
      "NoMatchETag": "",
      "MatchModifiedSince": "0001-01-01T00:00:00Z",
      "MatchUnmodifiedSince": "0001-01-01T00:00:00Z",
      "MatchRange": false,
      "Start": 0,
      "End": 0,
      "Encryption": null
    }
  },
  "duration": 5962,
  "error": "We encountered an internal error, please try again.: cause(s2: corrupt input)",
  "function": "CopyObject(destination, source)",
  "message": "GetObject failed",
  "name": "minio-go: testUnencryptedToSSES3CopyObject",
  "status": "FAIL"
}
(8/15) Running minio-java tests ... FAILED in 1 minutes and 44 seconds
{
  "name": "minio-java",
  "function": "copyObject()",
  "args": "[match etag]",
  "duration": 224,
  "status": "FAIL",
  "error": "error occurred\nErrorResponse(code = PreconditionFailed, message = At least one of the pre-conditions you specified did not hold, bucketName = minio-java-test-21s5ld5, objectName = minio-java-test-1mm37dd-copy, resource = /minio-java-test-21s5ld5/minio-java-test-1mm37dd-copy, requestId = 166633B25A7596E4, hostId = a70b194b-3deb-4217-951a-0cd9de8086b2)\nrequest={method=PUT, url=http://minio-dev6.minio.io:32349/minio-java-test-21s5ld5/minio-java-test-1mm37dd-copy, headers=x-amz-copy-source-if-match: 71cff0a060f852067e443ad1e24ae26c-1\nx-amz-copy-source: /minio-java-test-c3do6u/minio-java-test-1mm37dd\nHost: minio-dev6.minio.io:32349\nAccept-Encoding: identity\nUser-Agent: MinIO (Linux; amd64) minio-java/8.0.3\nContent-MD5: 1B2M2Y8AsgTpgAmY7PhCfg==\nx-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\nx-amz-date: 20210222T225237Z\nAuthorization: AWS4-HMAC-SHA256 Credential=*REDACTED*/20210222/us-east-1/s3/aws4_request, SignedHeaders=content-md5;host;x-amz-content-sha256;x-amz-copy-source;x-amz-copy-source-if-match;x-amz-date, Signature=*REDACTED*\n}\nresponse={code=412, headers=Accept-Ranges: bytes\nContent-Length: 418\nContent-Security-Policy: block-all-mixed-content\nContent-Type: application/xml\nETag: \"71cff0a060f852067e443ad1e24ae26c\"\nLast-Modified: Mon, 22 Feb 2021 22:52:37 GMT\nServer: MinIO\nVary: Origin\nX-Amz-Request-Id: 166633B25A7596E4\nX-Xss-Protection: 1; mode=block\nDate: Mon, 22 Feb 2021 22:52:37 GMT\n}\n >>> [io.minio.MinioClient.execute(MinioClient.java:775), io.minio.MinioClient.execute(MinioClient.java:563), io.minio.MinioClient.executePut(MinioClient.java:904), io.minio.MinioClient.copyObject(MinioClient.java:1232), FunctionalTest.testCopyObjectMatchETag(FunctionalTest.java:1850), FunctionalTest.copyObject(FunctionalTest.java:2016), FunctionalTest.runObjectTests(FunctionalTest.java:3757), FunctionalTest.runTests(FunctionalTest.java:3783), FunctionalTest.main(FunctionalTest.java:3927)]"
}
(8/15) Running minio-js tests ... done in 49 seconds
(9/15) Running minio-py tests ... done in 3 minutes and 11 seconds
(10/15) Running s3cmd tests ... FAILED in 6 seconds
{
  "name": "s3cmd",
  "duration": "3287",
  "function": "test_put_object_multipart",
  "status": "FAIL",
  "error": "WARNING: MD5 Sums don't match!\nWARNING: Retrying upload of /mint/data/datafile-65-MB\nWARNING: MD5 Sums don't match!\nWARNING: Retrying upload of /mint/data/datafile-65-MB\nWARNING: MD5 Sums don't match!\nWARNING: Retrying upload of /mint/data/datafile-65-MB\nWARNING: MD5 Sums don't match!\nWARNING: Retrying upload of /mint/data/datafile-65-MB\nWARNING: MD5 Sums don't match!\nWARNING: Retrying upload of /mint/data/datafile-65-MB\nWARNING: MD5 Sums don't match!\nWARNING: Too many failures. Giving up on '/mint/data/datafile-65-MB'\nERROR: \nUpload of '/mint/data/datafile-65-MB' part 1 failed. Use\n  /usr/local/bin/s3cmd abortmp s3://s3cmd-test-bucket-9864/s3cmd-test-object-31405 5e7f3815-7208-4c67-ad68-30c5b86c84a8\nto abort the upload, or\n  /usr/local/bin/s3cmd --upload-id 5e7f3815-7208-4c67-ad68-30c5b86c84a8 put ...\nto continue the upload.\nERROR: Upload of '/mint/data/datafile-65-MB' failed too many times (Last reason: )"
}
(10/15) Running s3select tests ... done in 8 seconds
(11/15) Running security tests ... done in 0 seconds

Executed 11 out of 15 tests successfully.

Deleting image on docker hub
Deleting image locally

Copy link
Contributor

@kannappanr kannappanr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@poornas poornas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harshavardhana harshavardhana merged commit 2a79ea0 into minio:master Feb 23, 2021
@harshavardhana harshavardhana deleted the fix-rest branch February 23, 2021 00:29
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

Successfully merging this pull request may close these issues.

None yet

4 participants