Repository navigation
CLDSRV-1083 add a replication compatibility mode - #6388
nicolas2bert wants to merge 1 commit into
Conversation
During a node-by-node upgrade, the nodes that are not upgraded yet read what an upgraded cloudserver writes, and they can't read the new replication format: an old backbeat doesn't replicate the objects, and an old cloudserver stops on the bucket replication configuration. With replicationCascadeCompatMode set, cloudserver stores and does what a cloudserver older than 9.4 does for replication: - the replicationInfo of an object is written in the old format, and no microVersionId is set on a metadata change - the bucket replication configuration is stored in the old shape. We refuse what an old cloudserver refuses: a single role for a CRR site, rules to different buckets, overlapping prefixes. Like it, we ignore the account of a rule - a replica is stored as backbeat sent it, with the status REPLICA. We ignore x-scal-micro-version-id and the version check of putData, so we don't compare revisions and we don't replicate a replica further - on an ACL change, we tell CRR from cloud destinations with the location type and not with the role of the backend: the old format has no role per backend. No change of behaviour outside the mode When the setting is absent or false, nothing changes.
Hello nicolas2bert,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Branches have divergedThis pull request's source branch To avoid any integration risks, please re-synchronize them using one of the
Note: If you choose to rebase, you may have to ask me to rebuild |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
| config.replicationCascadeCompatMode = true; | ||
| bucketPutReplication(makeAuthInfo('accessKey1'), request, log, err => { | ||
| config.replicationCascadeCompatMode = false; | ||
| assert(err.is.InvalidRequest); |
There was a problem hiding this comment.
Prefer comparing the error message over .is, so a failure shows the actual error name.
| assert(err.is.InvalidRequest); | |
| assert.strictEqual(err.message, 'InvalidRequest'); |
| (config, next) => { | ||
| if (!s3config.replicationCascadeCompatMode) { | ||
| return next(null, config); | ||
| } | ||
| const { refused, replicationConfig } = toLegacyConfiguration(config); | ||
| if (refused) { | ||
| return next(errorInstances[refused.code].customizeDescription(refused.description)); | ||
| } | ||
| return next(null, replicationConfig); | ||
| }, |
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 2 files with indirect coverage changes @@ Coverage Diff @@
## development/9.4 #6388 +/- ##
===================================================
- Coverage 86.85% 86.82% -0.03%
===================================================
Files 214 214
Lines 14707 14751 +44
===================================================
+ Hits 12774 12808 +34
- Misses 1933 1943 +10
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Add a setting,
replicationCascadeCompatMode, for the S3C upgrade to 10.1, the first S3C release with replication multi-destination and cascade.The reason: an S3C upgrade goes node by node. For a while, old and new nodes work on the same buckets and objects, and the old nodes don't understand what the new cloudserver does for replication:
So during the upgrade, the setting makes the new cloudserver behave like the old one: same format, no forwarding, no revision check. Once every node is upgraded, we turn it off and multi-destination and cascade start working.
For Artesca / Zenko nothing changes: the setting is off by default, and off is exactly today's behaviour.