-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Azure snapshots can not be restored anymore #26778
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
Azure snapshots can not be restored anymore #26778
Conversation
While working on elastic#26751 and doing some manual integration testing I found that this elastic#22858 removed an important line of our code: `AzureRepository` overrides default `initializeSnapshot` method which creates metadata files and do other stuff. But with PR elastic#22858, I wrote: ```java @OverRide public void initializeSnapshot(SnapshotId snapshotId, List<IndexId> indices, MetaData clusterMetadata) { if (blobStore.doesContainerExist(blobStore.container()) == false) { throw new IllegalArgumentException("The bucket [" + blobStore.container() + "] does not exist. Please create it before " + " creating an azure snapshot repository backed by it."); } } ``` instead of ```java @OverRide public void initializeSnapshot(SnapshotId snapshotId, List<IndexId> indices, MetaData clusterMetadata) { if (blobStore.doesContainerExist(blobStore.container()) == false) { throw new IllegalArgumentException("The bucket [" + blobStore.container() + "] does not exist. Please create it before " + " creating an azure snapshot repository backed by it."); } super.initializeSnapshot(snapshotId, indices, clusterMetadata); } ``` As we never call `super.initializeSnapshot(...)` files are not created and we can't restore what we saved. Closes elastic#26777.
imotov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good, but we need to figure out the test story here. That shouldn't have happened in the first place.
|
@imotov Agreed. So I discovered that while running The problem is that we never run automatically those tests. The manual tests I did previously were sadly:
But I did not test:
That's why I did not hit the issue. And BTW IT are not compatible anymore with 6.0 / 7.0 because we are now using secured settings. That's why I also did: Which I'm planning to backport anyway to 6.0 branch. Do you want me to backport within this PR the IT changes instead of doing it in #26751? |
|
@dadoonet I don't think it really matters if it goes as a part of this PR or another PR. As long as we have a test that would have failed without this change at the end I am fine with either. |
imotov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
lets merge this. |
While working on #26751 and doing some manual integration testing I found that this #22858 removed an important line of our code: `AzureRepository` overrides default `initializeSnapshot` method which creates metadata files and do other stuff. But with PR #22858, I wrote: ```java @OverRide public void initializeSnapshot(SnapshotId snapshotId, List<IndexId> indices, MetaData clusterMetadata) { if (blobStore.doesContainerExist(blobStore.container()) == false) { throw new IllegalArgumentException("The bucket [" + blobStore.container() + "] does not exist. Please create it before " + " creating an azure snapshot repository backed by it."); } } ``` instead of ```java @OverRide public void initializeSnapshot(SnapshotId snapshotId, List<IndexId> indices, MetaData clusterMetadata) { if (blobStore.doesContainerExist(blobStore.container()) == false) { throw new IllegalArgumentException("The bucket [" + blobStore.container() + "] does not exist. Please create it before " + " creating an azure snapshot repository backed by it."); } super.initializeSnapshot(snapshotId, indices, clusterMetadata); } ``` As we never call `super.initializeSnapshot(...)` files are not created and we can't restore what we saved. Closes #26777.
While working on #26751 and doing some manual integration testing I found that this #22858 removed an important line of our code: `AzureRepository` overrides default `initializeSnapshot` method which creates metadata files and do other stuff. But with PR #22858, I wrote: ```java @OverRide public void initializeSnapshot(SnapshotId snapshotId, List<IndexId> indices, MetaData clusterMetadata) { if (blobStore.doesContainerExist(blobStore.container()) == false) { throw new IllegalArgumentException("The bucket [" + blobStore.container() + "] does not exist. Please create it before " + " creating an azure snapshot repository backed by it."); } } ``` instead of ```java @OverRide public void initializeSnapshot(SnapshotId snapshotId, List<IndexId> indices, MetaData clusterMetadata) { if (blobStore.doesContainerExist(blobStore.container()) == false) { throw new IllegalArgumentException("The bucket [" + blobStore.container() + "] does not exist. Please create it before " + " creating an azure snapshot repository backed by it."); } super.initializeSnapshot(snapshotId, indices, clusterMetadata); } ``` As we never call `super.initializeSnapshot(...)` files are not created and we can't restore what we saved. Closes #26777.
While working on #26751 and doing some manual integration testing I found that this #22858 removed an important line of our code:
AzureRepositoryoverrides defaultinitializeSnapshotmethod which creates metadata files and do other stuff.But with PR #22858, I wrote:
instead of
As we never call
super.initializeSnapshot(...)files are not created and we can't restore what we saved.Closes #26777.