-
Notifications
You must be signed in to change notification settings - Fork 35
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
Give possibility for restoring DC using mapping sourceDC -> destinationDC #3829
Comments
Agree, but how this is a Scylla Manager issue to fix? |
We could potentially address the problem by allowing to restore just a single DC from the location bucket. |
@tzach - we need a resolution. for now almost all sct tests are failing since they are multi DC. We will add a couple of pipelines for a single DC + encryption but are are disabling the multi DC jobs as they constantly failing. @mikliapko as discussed, please create a task for the new pipelines. and disable the multi DC ones for now. Thanks |
Since there is an issue with multiDC cluster restore when the EaR is turned on (scylladb/scylla-manager#3829), it was decided to temporarily switch the main part of jobs to run on singleDC cluster. Only one multiDC cluster job is left for enterprise version 2022 where EaR is not implemented.
Since there is an issue with multiDC cluster restore when the EaR is turned on (scylladb/scylla-manager#3829), it was decided to temporarily switch the main part of jobs to run on singleDC cluster. Only one multiDC cluster job is left for enterprise version 2022 where EaR is not implemented.
Since there is an issue with multiDC cluster restore when the EaR is turned on (scylladb/scylla-manager#3829), it was decided to temporarily switch the main part of jobs to run on singleDC cluster. Only one multiDC cluster job is left for enterprise version 2022 where EaR is not implemented.
Since there is an issue with multiDC cluster restore when the EaR is turned on (scylladb/scylla-manager#3829), it was decided to temporarily switch the main part of jobs to run on singleDC cluster. Only one multiDC cluster job is left for enterprise version 2022 where EaR is not implemented.
Since there is an issue with multiDC cluster restore when the EaR is turned on (scylladb/scylla-manager#3829), it was decided to temporarily switch the main part of jobs to run on singleDC cluster. Only one multiDC cluster job is left for enterprise version 2022 where EaR is not implemented.
Since there is an issue with multiDC cluster restore when the EaR is turned on (scylladb/scylla-manager#3829), it was decided to temporarily switch the main part of jobs to run on singleDC cluster. Only one multiDC cluster job is left for enterprise version 2022 where EaR is not implemented.
Since there is an issue with multiDC cluster restore when the EaR is turned on (scylladb/scylla-manager#3829), it was decided to temporarily switch the main part of jobs to run on singleDC cluster. Only one multiDC cluster job is left for enterprise version 2022 where EaR is not implemented.
Since there is an issue with multiDC cluster restore when the EaR is turned on (scylladb/scylla-manager#3829), it was decided to temporarily switch the main part of jobs to run on singleDC cluster. Only one multiDC cluster job is left for enterprise version 2022 where EaR is not implemented.
Since there is an issue with multiDC cluster restore when the EaR is turned on (scylladb/scylla-manager#3829), it was decided to temporarily switch the main part of jobs to run on singleDC cluster. Only one multiDC cluster job is left for enterprise version 2022 where EaR is not implemented.
Since there is an issue with multiDC cluster restore when the EaR is turned on (scylladb/scylla-manager#3829), it was decided to temporarily switch the main part of jobs to run on singleDC cluster. Only one multiDC cluster job is left for enterprise version 2022 where EaR is not implemented.
Since there is an issue with multiDC cluster restore when the EaR is turned on (scylladb/scylla-manager#3829), it was decided to temporarily switch the main part of jobs to run on singleDC cluster. Only one multiDC cluster job is left for enterprise version 2022 where EaR is not implemented. (cherry picked from commit 4da831d)
grooming notes The initial idea is to add new flag to the restore CLI, so that it's possible to define the origin DC from the backup location. @mikliapko SCT will have to be updated to test the scenario with restoring single DC. |
Fixes #3829 s: filter by dc
Fixes #3829 s: filter by dc
After giving it some more thought, I wouldn't recommend adding it in such way.
So running many restore tasks, one by one, DC by DC, would result in lots of redundant work. A better idea could be to extend restore with a flag like
|
@Michal-Leszczynski |
disrupt_mgmt_restore doesn't support multiDC cluster configuration due to the issues: - scylladb/scylla-manager#3829 - scylladb/scylla-manager#4049 Thus, it should be skipped if both issues are opened and cluster configuration is multiDC.
disrupt_mgmt_restore doesn't support multiDC cluster configuration due to the issues: - scylladb/scylla-manager#3829 - scylladb/scylla-manager#4049 Thus, it should be skipped if both issues are opened and cluster configuration is multiDC.
I've put some additional thoughts to this issue to see what syntax we may want to support in restore command to cover following use cases, considering Michał findings that restoring DCs one by one could be problematic:
Here is possible combinations of DCs in source and cluster target:
Considering above options, following syntax can be used
Alternatively to improve readability json file with mappings can be used, e.g.
where mapping.json {
"mappings": [
{"source": ["dc1"], "target": ["dc2"]},
{"source": ["dc1", "dc2"], "target": ["dc3"]}
]
}
This syntax also can be used for to restore schema as well (#4049 ) , then we can modify WITH replication = {...} without requiring manual change from the user. @karol-kokoszka @Michal-Leszczynski What do you think about this? |
Nice examples! I'm just wondering if it's useful to go for the We also need to think about the validation. What happens when user specifies only a subset of backup DCs? In some cases, it might make sense to restore just a subset of DCs, but it should be clearly specified by the user so that it does not happen by accident. We could make it so that all DCs need to be specified, but some of them might be mapped to an empty set of DCs meaning that they wouldn't be restored at all. Finally, what should be the default values? Just identity mapping? In terms of the syntax and parsing, we should re-use the |
Yes, the syntax for cmd looks quite complicated (and it's getting only more complicated, see below answers 😄 ), so maybe it's better to support only json input for dc-mapping.
Yes, it's just a mistake :)
Very good question! Maybe we can use --dc option with simplified semantics of --dc from backup command? So by default if only --dc-mapping is provided, we expect that all DCs must be specified, but if user wants to specify only subset of DCs, then it should be explicitly stated using the --dc flag. Here is an example of how I see that:
But it looks at little bit complicated :)
Good question. if --dc-mapping is not provided we can preserve current behavior. But if we think that current behavior is doesn't worth to preserve, then yes, we can try to map DC's, but their names should be match otherwise error? |
That could also work, but the flag should accept the json in the regular text format instead of the file name (in some cases, it might be annoying to create the file just to run the restore command, but you can always include the file into the command line by using
Yeah, creating 2 flags for controlling dc mapping seems like an overkill. I think that allowing empty values in the mapping or adding a special character (invalid in DC names) for marking that given DC shouldn't be restored at all makes more sense.
The current behavior is not something worth preserving, so I would say that the identity mapping which fails when dc names does not match seems to be the best one to me. By does not match, I mean that the backup and restore DCs should be identical. This means that if |
disrupt_mgmt_restore doesn't support multiDC cluster configuration due to the issues: - scylladb/scylla-manager#3829 - scylladb/scylla-manager#4049 Thus, it should be skipped if both issues are opened and cluster configuration is multiDC.
disrupt_mgmt_restore doesn't support multiDC cluster configuration due to the issues: - scylladb/scylla-manager#3829 - scylladb/scylla-manager#4049 Thus, it should be skipped if both issues are opened and cluster configuration is multiDC. (cherry picked from commit 53fbf07)
disrupt_mgmt_restore doesn't support multiDC cluster configuration due to the issues: - scylladb/scylla-manager#3829 - scylladb/scylla-manager#4049 Thus, it should be skipped if both issues are opened and cluster configuration is multiDC. (cherry picked from commit 53fbf07)
disrupt_mgmt_restore doesn't support multiDC cluster configuration due to the issues: - scylladb/scylla-manager#3829 - scylladb/scylla-manager#4049 Thus, it should be skipped if both issues are opened and cluster configuration is multiDC. (cherry picked from commit 53fbf07)
disrupt_mgmt_restore doesn't support multiDC cluster configuration due to the issues: - scylladb/scylla-manager#3829 - scylladb/scylla-manager#4049 Thus, it should be skipped if both issues are opened and cluster configuration is multiDC. (cherry picked from commit 53fbf07)
disrupt_mgmt_restore doesn't support multiDC cluster configuration due to the issues: - scylladb/scylla-manager#3829 - scylladb/scylla-manager#4049 Thus, it should be skipped if both issues are opened and cluster configuration is multiDC. (cherry picked from commit 53fbf07)
disrupt_mgmt_restore doesn't support multiDC cluster configuration due to the issues: - scylladb/scylla-manager#3829 - scylladb/scylla-manager#4049 Thus, it should be skipped if both issues are opened and cluster configuration is multiDC. (cherry picked from commit 53fbf07)
disrupt_mgmt_restore doesn't support multiDC cluster configuration due to the issues: - scylladb/scylla-manager#3829 - scylladb/scylla-manager#4049 Thus, it should be skipped if both issues are opened and cluster configuration is multiDC. (cherry picked from commit 53fbf07)
disrupt_mgmt_restore doesn't support multiDC cluster configuration due to the issues: - scylladb/scylla-manager#3829 - scylladb/scylla-manager#4049 Thus, it should be skipped if both issues are opened and cluster configuration is multiDC. (cherry picked from commit 53fbf07)
disrupt_mgmt_restore doesn't support multiDC cluster configuration due to the issues: - scylladb/scylla-manager#3829 - scylladb/scylla-manager#4049 Thus, it should be skipped if both issues are opened and cluster configuration is multiDC. (cherry picked from commit 53fbf07)
This adds support for --dc-mapping flag to restore command. It specifies mapping between DCs from the backup and DCs in the restored(target) cluster. All DCs from the source cluster should be explicitly mapped to all DCs in the target cluster. The only exception is when source and target cluster has exact match: source dcs == target dcs. Only works with tables restoration (--restore-tables=true). Syntax: "source_dc1,source_dc2=>target_dc1,target_dc2" Multiple mappings are separated by semicolons (;). Exclamation mark (!) before a DC indicates that it should be ignored during restore. Examples: "dc1,dc2=>dc3" - data from dc1 and dc2 DCs should be restored to dc3 DC. "dc1,dc2=>dc3,!dc4" - data from dc1 and dc2 DCs should be restored to dc3 DC. Ignoring dc4 DC from target cluster. "dc1,!dc2=>dc2" - data from dc1 should be restored to dc2 DC. Ignoring dc2 from source cluster. Fixes: #3829
This introduces use of dc mappings when restoring tables. Now each dc is downloading only data from corresponding dc(s) accordingly to user provided mapping. Also some dcs can be explicitly ignored. Fixes: #3829
This adds another cluster to docker setup, so we can have integration tests for dc-mappings. Fixes: #3829
#3871
Right now, there is no option in the Scylla Manager restore task to restore just a single data center (DC) from the backup location. This could lead to problematic situations, particularly when:
Encryption at Rest (EaR) is enabled,
Two DCs use different encryption keys,
Encryption keys are stored in different cloud regions, and
There is only one backup location available.
To address this, we would need to make the encryption keys multi-regional to facilitate the restoration process in such scenarios.
The
location
flag may not be very intuitive, as the[dc]
part defines the destination DC, not the source DC data. We need to discuss during the manager planning to determine if a new flag specifying the source is necessary.If we can restore just a single DC, then we can restore DC by DC, avoiding the need to create multi-regional keys.
(cc: @tzach)
The text was updated successfully, but these errors were encountered: