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

[FEATURE] Make the job scheduler lock index a system index #305

Closed
bowenlan-amzn opened this issue Jan 20, 2023 · 3 comments
Closed

[FEATURE] Make the job scheduler lock index a system index #305

bowenlan-amzn opened this issue Jan 20, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@bowenlan-amzn
Copy link
Member

The job scheduler lock index (.opendistro-job-scheduler-lock) is used fully internally and shouldn't be changed by user.
If user inadvertently change this index, it could cause jobs to not running anymore.
Making it a system index can protect it from being changed by user.

@bowenlan-amzn bowenlan-amzn added enhancement New feature or request untriaged and removed untriaged labels Jan 20, 2023
@cwperks
Copy link
Member

cwperks commented Mar 22, 2023

@joshpalis This may be a good first issue and should be straightforward. There is always a chance when adding a system index that the plugin needs to be re-factored to stash the thread context before trying to interact with the system index so testing needs to be done to ensure the plugin works as expected.

For background, a system index has special protections so that not even the admin can delete it. It is there to prevent a cluster admin from inadvertently corrupting the cluster and have opensearch and its plugins not behave as expected.

Assuming that no re-factoring is needed, then this index needs to be added in the following 2 files of the security plugin:

This setting in opensearch.yml is what gives indices system index protection provided by the security plugin.

@cwperks
Copy link
Member

cwperks commented Mar 22, 2023

I don't see any instances of stashContext in the code so that would need to be added before the system index can be added in the security plugin. Can I take on this task?

Here are 2 places where the index is interacted with:

@joshpalis
Copy link
Member

Hi @cwperks sure, Ill assign this to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants