This is a quick program where users can thoroughly check that objects have been replicated to destination backends (as expected).
Considering that the program is querying each backend x number of times (where x is the number of objects on the source), this can become a relatively expensive test.
With that in mind, if you have trust issues (like me), this will be a good way to check that 1. the replication status on the source object is correct and 2. users can retrieve the replicated object directly from the destination sources.
At this time, the setup process is slightly convoluted.
The 2 main files I will cover below are example.credentials.js
and
constants.js
- Change the name (or make a copy) of
example.credentials.js
tocredentials.js
- In
credentials.js
, update your cloud backend credentials to use your access values. a. Name each profile accordingly, as you will need to reference them later inconstants.js
. b. For Azure type backends, you can use an access string as the value forstorageAccount
, and leavestorageAccessKey
andhost
blank. c. For GCP type backends, theprojectId
can be found in your gcp browser settings. ThekeyFilename
should be the path to your private key file. An exampleexample.gcp_key1.json
file has been given as an example. - In
constants.js
, update the values accordingly. a. ThedestinationBuckets
value should be an array of objects. Thecredentials
value for each object should correspond to a valid profile incredentials.js
. b. Forbackend
, the supported values are currentlyzenko
,gcp
,aws
, andazure
. c. ThebucketName
should be the destination bucket or container name. d.numObjs
is the number of objects you put, andobjnamePrefix
is the object name prefix that you choose to use. This program is assuming that the objects you are looking for were uploaded cosbench style, with all objects uploaded in the same test named in ascending numerical order. i.e. cosbench objects are named [myobjects1, myobjects2, myobjects3 ...] and so on. - Run
npm start
. It will stop all tests and log the error. Note: errors due to timeouts (most commonly seen with Azure) are not retried
Since there is a draft, there are many other things that are lined up to improve. The below list is not inclusive of all issues.
- Retries for objects that failed for reasons other than 404 (example: very
common to see
ECONNRESET
from Azure) - More thorough testing for each object (compare object hashes, metadata, etc)