restore: skip_localities_check no longer works#101682
restore: skip_localities_check no longer works#101682craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
4423664 to
dcc0404
Compare
There was a problem hiding this comment.
nit: could you clean up the commit title to: "fix skip_localities_check"? Also, i think you could clarify in the commit message that a restore on a cluster with mismatched localities was failing even when the the skip_localities check was passed.
The restore_job and jobs.proto changes lgtm though!
| pq: detected a mismatch in regions between the restore cluster and the backup cluster, missing regions detected: us-east-1, us-west-1. | ||
| HINT: there are two ways you can resolve this issue: 1) update the cluster to which you're restoring to ensure that the regions present on the nodes' --locality flags match those present in the backup image, or 2) restore with the "skip_localities_check" option | ||
|
|
||
| exec-sql |
There was a problem hiding this comment.
nit: I'd run the cluster restore first, then the database restore with the new_db_name option. Else, the cluster restore may flake because it detects database that's in the process of getting dropped, even after the DROP DATABASE command returns.
There was a problem hiding this comment.
Good point let me change this
|
Updated this to: |
Previously, there was no additional validation for generating zone configurations during restore, so nothing bad would happen if regions were missing during restore. Later on, the zone config generation process had validation to ensure all regions existed. This was problematic for restores with skip_localities_check since we would still incorrectly check localities. To address this, this patch adds an option to skip validation of regions when generating zone configurations. Fixes: cockroachdb#100913 Release note (bug fix): Previously, RESTORE with skip_localities_check would still fail with errors if regions were missing on a cluster.
dcc0404 to
ddbac17
Compare
|
TFTR @msbutler @chengxiong-ruan bors r+ |
|
Build succeeded: |
|
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from ddbac17 to blathers/backport-release-22.2-101682: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 22.2.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Previously, there was no additional validation for generating zone configurations so if regions were
missing during the process no errors would be generated. Later on the generation process had validation added to validate that all regions reference existed within the zone configuration. To address this, this patch adds an option to skip validation of regions when
generating zone configurations.
Fixes: #100913
Release note (bug fix): Previously, RESTORE with skip_localities_check would still fail with errors if regions were missing on a cluster.