Skip to content
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

[2.15] Revert "[Backport 2.x] Remove static metaFields list and get version-specific values from core" #4474

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

…specific values from core (#4412)"

This reverts commit b3df23e.

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
@cwperks
Copy link
Member

cwperks commented Jun 18, 2024

Let's add some info around the reason for the reversion.

This is to resolve a failure seen during release integ testing in the ISM plugin.

[2024-06-15T03:57:00,516][WARN ][o.o.i.c.IndicesClusterStateService] [node_name_9200] [openactionit_index_1][0] marking and sending shard failed due to [failed to create index]
java.lang.NullPointerException: Cannot invoke "org.opensearch.index.mapper.MapperService.getMetadataFields()" because the return value of "org.opensearch.index.IndexService.mapperService()" is null
	at org.opensearch.security.configuration.SecurityFlsDlsIndexSearcherWrapper.<init>(SecurityFlsDlsIndexSearcherWrapper.java:65) ~[?:?]
	at org.opensearch.security.OpenSearchSecurityPlugin.lambda$onIndexModule$3(OpenSearchSecurityPlugin.java:697) ~[?:?]
	at org.opensearch.index.IndexService.<init>(IndexService.java:292) ~[opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.index.IndexModule.newIndexService(IndexModule.java:634) ~[opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.indices.IndicesService.createIndexService(IndicesService.java:888) ~[opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.indices.IndicesService.createIndex(IndicesService.java:775) ~[opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.indices.IndicesService.createIndex(IndicesService.java:215) ~[opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.indices.cluster.IndicesClusterStateService.createIndices(IndicesClusterStateService.java:557) [opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.indices.cluster.IndicesClusterStateService.applyClusterState(IndicesClusterStateService.java:292) [opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:625) [opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:611) [opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:579) [opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:502) [opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:204) [opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:882) [opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.common.util.concurrent.PrioritizedOpenSearchThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedOpenSearchThreadPoolExecutor.java:283) [opensearch-2.15.0.jar:2.15.0]
	at org.opensearch.common.util.concurrent.PrioritizedOpenSearchThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedOpenSearchThreadPoolExecutor.java:246) [opensearch-2.15.0.jar:2.15.0]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) [?:?]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) [?:?]
	at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]

It was seen in CloseActionIT and OpenActionIT which have integration tests around opening and closing indices.

We reproduced the NPE by closing and opening an index, but have not fully analyzed how the NPE affects FLS rules when re-opening an index.

We plan to introduce this bug fix for FLS Includes rules in a future release and add an additional test case where a closed index is re-opened and searched upon by a user that is mapped to a role with FLS Includes rules.

@cwperks
Copy link
Member

cwperks commented Jun 18, 2024

@DarshitChanpura Can you also update release notes?

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.35%. Comparing base (cdc792c) to head (fc3fc4c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             2.15    #4474      +/-   ##
==========================================
- Coverage   65.37%   65.35%   -0.03%     
==========================================
  Files         311      311              
  Lines       21868    21862       -6     
  Branches     3550     3550              
==========================================
- Hits        14297    14288       -9     
- Misses       5805     5806       +1     
- Partials     1766     1768       +2     
Files Coverage Δ
...figuration/SecurityFlsDlsIndexSearcherWrapper.java 97.22% <100.00%> (-0.40%) ⬇️

... and 2 files with indirect coverage changes

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
@DarshitChanpura
Copy link
Member Author

@cwperks done. I've created an issue to track this: #4475

@DarshitChanpura DarshitChanpura merged commit 9674301 into 2.15 Jun 18, 2024
87 of 88 checks passed
@DarshitChanpura DarshitChanpura deleted the revert-4412-backport/backport-4370-to-2.x branch June 18, 2024 21:31
@peterzhuamazon peterzhuamazon changed the title Revert "[Backport 2.x] Remove static metaFields list and get version-specific values from core" [2.15] Revert "[Backport 2.x] Remove static metaFields list and get version-specific values from core" Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants