-
Notifications
You must be signed in to change notification settings - Fork 113
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
Make ActionRequests that extend UpdateRequest to extend more generic ActionRequest #1311
Make ActionRequests that extend UpdateRequest to extend more generic ActionRequest #1311
Conversation
Signed-off-by: Craig Perkins <[email protected]>
…ActionRequest Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Adding changes from #1310 |
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
This reverts commit 7c82470. Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
…ect/OpenSearch#16568) Signed-off-by: Craig Perkins <[email protected]>
@@ -268,17 +268,27 @@ constructor( | |||
updateSettingReqsList.add( | |||
UpdateSettingsRequest().indices(*readOnlyIndices.map { indices[it] }.toTypedArray()) | |||
.settings( | |||
Settings.builder().put(ManagedIndexSettings.AUTO_MANAGE.key, false) | |||
.put(INDEX_READ_ONLY_SETTING.key, true), | |||
Settings.builder().put(INDEX_READ_ONLY_SETTING.key, false), |
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 in this file are needed to adapt to a bugfix in core: https://github.com/opensearch-project/OpenSearch/pull/16568/files#diff-4294469155ee17976f9046a05d7fb983ddce7d8398f780b7e60c17065e521f4f
Core allows the readonly settings to change in an update request if and only if its the only setting being changed.
There used to be a bug in core that allowed changes of multiple settings because the conditional did not group the settings together in the same group (i.e. condition1 && condition2 || condition3 || condition4
instead of condition1 && (condition2 || condition3 || condition4)
)
if (request.settings().size() == 1 && // we have to allow resetting these settings otherwise users can't unblock an index
IndexMetadata.INDEX_BLOCKS_METADATA_SETTING.exists(request.settings())
|| IndexMetadata.INDEX_READ_ONLY_SETTING.exists(request.settings())
|| IndexMetadata.INDEX_BLOCKS_READ_ONLY_ALLOW_DELETE_SETTING.exists(request.settings())) { ... }
To adapt to the change, this is now setting readonly to false
initially and then doing a follow-up request to set it back to true
and auto-manage
to false
.
Signed-off-by: Craig Perkins <[email protected]>
@vikasvb90 @bowenlan-amzn @tandonks All checks are passing now that the 2.x build was fixed in #1315 |
Description
WIP to fix errors seen in CI with security checks.
See more details on opensearch-project/security#4937
Related Issues
Resolves #1281
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.