The VAST cluster handles the object's Entity Tag (ETag) field and the Content-MD5 header as follows:
For regular S3 uploads (non-multipart):
The ETag calculated by the VAST cluster is the MD5 checksum of the data in the upload request.
The ETag that the cluster calculates is compared with the value of the (optional) Content-MD5 header sent by the client. If the comparison fails, the request fails.
If the request succeeds, the ETag is stored and is also returned to the client.
For multipart uploads:
For each part being uploaded, a separate ETag is calculated for each part, compared with the MD5 checksum sent by the client in the Content-MD5 header, as for non-multipart uploads, and returned as a header in the response.
As part of multipart upload completion, the VAST cluster generates a single ETag for the whole multipart upload. This ETag is the MD5 checksum of the concatenation of the parts’ ETags, followed by a dash and then the number of parts. For example, for a 10-part upload:
9b2cf535f27731c974343645a3985328-10.As part of the complete multipart upload request, the client must send a list of parts and an ETag for each part during completion. The VAST cluster validates that list.
When a non-S3 protocol such as NFS or SMB creates or modifies an S3 object or changes its size:
A unique S3 ETag is calculated based on metadata. Such ETags include a fixed prefix to identify them (
48ed760a74). In case of modification, where the object previously had an S3 ETag, the ETag is replaced.
Support of Weak ETags
Starting with version 5.4.4, the VAST cluster supports weak ETags (prefixed wiith W/) in If-None-Match headers of S3 requests.
If the client sends a weak ETag: W/"tag-string" where the tag-string matches the strong ETag: "tag-string", the VAST cluster returns 304 Not Modified. If it does not match, 200 OK is returned.
In versions prior to 5.4.4, requests with weak ETags are rejected with a 400 Bad Request error.
Supported Requests with Content-MD5 Header
The Content-MD5 header can be sent with the following requests, where it is used to validate the payload:
DeleteObjects
PutBucketAcl
PutBucketPolicy
PutBucketVersioning
PutBucketOwnershipControls
PutBucketLogging
PutBucketNotificationConfiguration
PutObjectAcl
PutObjectRetention
PutObjectLockConfiguration
PutObjectLegalHold
PutObjectTagging
PutBucketTagging