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

Added changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting #9286

Merged

Conversation

ajaymovva
Copy link
Contributor

@ajaymovva ajaymovva commented Aug 12, 2023

Description

This PR consists of below functionalities

  • Adding core transport interceptors in network module to intercept the requests at the transport layer.
  • AdmissionControlInterceptor to add the new AdmissionControlHandler, and that handler will be triggered for every transport request.
    -The initial implementation of AdmissionControlService, which is currently used to register the admission controllers and trigger the registered admission controllers for every transport request if it is enabled.
  • AdmissionControlSettings -> Settings related to AdmissionController Feature.
  • Basic Implementation of the CPU-Based Admission Controller, which currently only tracks the number of transport calls if the admission controller is enabled.
  • CPUBasedAdmissionControllerSettings, which have the settings specific to the CPU-based admission controller.

Note:

This PR only have initial basic implementation of many classes. As this is the first PR for this feature we are making sure to give basic idea how admission controller is tracing the transport requests and eventually how we will reject the requests if the threshold breaches based on each admission controllers

Related Issues

Ref: #8910

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:



> Task :checkCompatibility
Incompatible components: [https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/performance-analyzer.git]
Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git]

BUILD SUCCESSFUL in 24m 6s

@ajaymovva ajaymovva force-pushed the feature/admission-controller branch 2 times, most recently from babe211 to efbd221 Compare August 15, 2023 17:32
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:



> Task :checkCompatibility
Incompatible components: [https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/cross-cluster-replication.git]
Compatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/performance-analyzer-rca.git]

BUILD SUCCESSFUL in 32m 6s

@ajaymovva ajaymovva changed the title Admission Controller Module Rest and Transport Interceptor Commit Admission Controller Module Transport Interceptor Initial Commit Aug 22, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@ajaymovva ajaymovva force-pushed the feature/admission-controller branch 2 times, most recently from 9a65c7c to be089cf Compare August 30, 2023 07:34
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 30, 2023

Compatibility status:

Checks if related components are compatible with change fa39f9a

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git]

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Compatibility status:

Checks if related components are compatible with change be089cf

Incompatible components

Skipped components

Compatible components

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2023

Compatibility status:

Checks if related components are compatible with change a1e6134

Incompatible components

Skipped components

Compatible components

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2023

Compatibility status:

Checks if related components are compatible with change f60c6b5

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git]

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

Compatibility status:

Checks if related components are compatible with change de4ea96

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git]

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

Compatibility status:

Checks if related components are compatible with change 25c16b6

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git]

Ajay Kumar Movva added 6 commits October 20, 2023 18:03
…ed AdmissionController

Signed-off-by: Ajay Kumar Movva <[email protected]>
Signed-off-by: Ajay Kumar Movva <[email protected]>
Signed-off-by: Ajay Kumar Movva <[email protected]>
Signed-off-by: Ajay Kumar Movva <[email protected]>
Signed-off-by: Ajay Kumar Movva <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@Bukhtawar Bukhtawar merged commit 7c5a806 into opensearch-project:main Oct 21, 2023
16 checks passed
austintlee pushed a commit to austintlee/OpenSearch that referenced this pull request Oct 23, 2023
…rvice for RateLimiting (opensearch-project#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (opensearch-project#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>
austintlee pushed a commit to austintlee/OpenSearch that referenced this pull request Oct 23, 2023
…rvice for RateLimiting (opensearch-project#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (opensearch-project#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>
@rramachand21 rramachand21 added the v2.12.0 Issues and PRs related to version 2.12.0 label Oct 31, 2023
@ajaymovva ajaymovva self-assigned this Nov 2, 2023
austintlee pushed a commit to austintlee/OpenSearch that referenced this pull request Dec 13, 2023
…rvice for RateLimiting (opensearch-project#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (opensearch-project#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>
@ajaymovva ajaymovva added the backport 2.x Backport to 2.x branch label Jan 22, 2024
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-9286-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 7c5a806d5bbee77c0c4a184a500bf5522a8d8cd7
# Push it to GitHub
git push --set-upstream origin backport/backport-9286-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-9286-to-2.x.

ajaymovva added a commit to ajaymovva/OpenSearch that referenced this pull request Jan 22, 2024
…rvice for RateLimiting (opensearch-project#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (opensearch-project#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>
ajaymovva added a commit to ajaymovva/OpenSearch that referenced this pull request Jan 31, 2024
…rvice for RateLimiting (opensearch-project#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (opensearch-project#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>
ajaymovva added a commit to ajaymovva/OpenSearch that referenced this pull request Jan 31, 2024
…rvice for RateLimiting (opensearch-project#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (opensearch-project#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>
ajaymovva added a commit to ajaymovva/OpenSearch that referenced this pull request Feb 1, 2024
…rvice for RateLimiting (opensearch-project#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (opensearch-project#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>
ajaymovva added a commit to ajaymovva/OpenSearch that referenced this pull request Feb 4, 2024
…rvice for RateLimiting (opensearch-project#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (opensearch-project#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>
ajaymovva added a commit to ajaymovva/OpenSearch that referenced this pull request Feb 5, 2024
…rvice for RateLimiting (opensearch-project#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (opensearch-project#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>
ajaymovva added a commit to ajaymovva/OpenSearch that referenced this pull request Feb 6, 2024
…rvice for RateLimiting (opensearch-project#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (opensearch-project#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>
ajaymovva added a commit to ajaymovva/OpenSearch that referenced this pull request Feb 6, 2024
…rvice for RateLimiting (opensearch-project#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (opensearch-project#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>
sachinpkale pushed a commit that referenced this pull request Feb 6, 2024
…ntroller (#12111)

* Added changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>

* Integrate CPU AC with ResourceUsageCollector and add CPU AC stats to nodes/stats (#10887)

* Added changes to integrade cpu AC to ResourceUsageCollector and Emit Stats

Signed-off-by: Ajay Kumar Movva <[email protected]>
Co-authored-by: Bharathwaj G <[email protected]>

* Updating Version to 2.12 for the AC Stats

Signed-off-by: Ajay Kumar Movva <[email protected]>

---------

Signed-off-by: Ajay Kumar Movva <[email protected]>
Co-authored-by: Bharathwaj G <[email protected]>
Co-authored-by: Ajay Kumar Movva <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…rvice for RateLimiting (opensearch-project#9286)

* Changes for AdmissionControl Interceptor and AdmissionControlService for RateLimiting (opensearch-project#9286)

Signed-off-by: Ajay Kumar Movva <[email protected]>

Signed-off-by: Shivansh Arora <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch backport-failed v2.12.0 Issues and PRs related to version 2.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants