-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Remove auto creation of container for azure repository #22858
Merged
dadoonet
merged 1 commit into
elastic:master
from
dadoonet:pr/remove-azure-container-auto-creation
Jan 31, 2017
Merged
Remove auto creation of container for azure repository #22858
dadoonet
merged 1 commit into
elastic:master
from
dadoonet:pr/remove-azure-container-auto-creation
Jan 31, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Follow up of elastic#22857 where we deprecate automatic creation of azure containers. BTW I found that the `AzureSnapshotRestoreServiceIntegTests` does not bring any value because it runs basically a Snapshot/Restore operation on local files which we already test in core. So instead of trying to fix it to make it pass with this PR, I simply removed it.
rjernst
approved these changes
Jan 30, 2017
dadoonet
added a commit
to dadoonet/elasticsearch
that referenced
this pull request
Sep 25, 2017
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.
dadoonet
commented
Sep 25, 2017
logger.debug("container [{}] does not exist. Creating...", blobStore.container()); | ||
blobStore.createContainer(blobStore.container()); | ||
} | ||
super.initializeSnapshot(snapshotId, indices, clusterMetadata); |
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.
This line has been removed by mistake with this PR. See #26777
jasontedor
pushed a commit
that referenced
this pull request
Sep 25, 2017
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.
jasontedor
pushed a commit
that referenced
this pull request
Sep 25, 2017
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.
jasontedor
pushed a commit
that referenced
this pull request
Sep 25, 2017
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>breaking
:Distributed Coordination/Snapshot/Restore
Anything directly related to the `_snapshot/*` APIs
v6.0.0-alpha1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow up of #22857 where we deprecate automatic creation of azure containers.
BTW I found that the
AzureSnapshotRestoreServiceIntegTests
does not bring any value because it runs basically a Snapshot/Restore operation on local files which we already test in core.So instead of trying to fix it to make it pass with this PR, I simply removed it.