Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

CORTX-30330: Resource Quota Update #858

Conversation

abhijit1patil
Copy link
Contributor

@abhijit1patil abhijit1patil commented Jun 12, 2022

Pull Request

Problem Statement

  • Need to have only 1 session per user
  • Update formulae to update calculation of request quota

Design

  • At the time of successful login, check if valid session exists, if yes, return that session or create a new session and return
  • Formulae :- (quota = MaxAvailableMemForRequest/ RequestSize)

Custom build and deployment

  • Custom Build job

  • Custom Build
    cortx-docker.colo.seagate.com/seagate/cortx-rgw:2.0.0-6689-custom-ci
    cortx-docker.colo.seagate.com/seagate/cortx-data:2.0.0-6689-custom-ci
    cortx-docker.colo.seagate.com/seagate/cortx-control:2.0.0-6689-custom-ci

  • Deployment Job

Dev Testing

Admin Login from Client Machine
image

Admin Login from Postman
image

Coding

Checklist for Author

  • Coding conventions are followed and code is consistent

Testing

Checklist for Author

  • Unit and System Tests are added
  • Test Cases cover Happy Path, Non-Happy Path and Scalability
  • Testing was performed with RPM

Impact Analysis

Checklist for Author/Reviewer/GateKeeper

  • Interface change (if any) are documented
  • Side effects on other features (deployment/upgrade)
  • Dependencies on other component(s)

Review Checklist

Checklist for Author

  • JIRA number/GitHub Issue added to PR
  • PR is self reviewed
  • Jira and state/status is updated and JIRA is updated with PR link
  • Check if the description is clear and explained

Documentation

Checklist for Author

  • Changes done to WIKI / Confluence page / Quick Start Guide

@cla-bot cla-bot bot added the cla-signed label Jun 12, 2022
@abhijit1patil abhijit1patil marked this pull request as ready for review June 13, 2022 11:14
Signed-off-by: abhijit1patil <abhijit.1.patil@seagate.com>
Signed-off-by: abhijit1patil <abhijit.1.patil@seagate.com>
@abhijit1patil abhijit1patil force-pushed the resource_limit_update branch from 44fd6dd to bb8834c Compare June 14, 2022 05:58
Signed-off-by: abhijit1patil <abhijit.1.patil@seagate.com>
Signed-off-by: abhijit1patil <abhijit.1.patil@seagate.com>
@pawankumarsrivastava pawankumarsrivastava merged commit 34668e9 into Seagate:F_40B_Resource_Limits Jun 14, 2022
kupranay pushed a commit that referenced this pull request Aug 4, 2022
* CORTX-30331: active users quota (#824)

* CORTX-30331: implement the session manager that maintains quota

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-30331: refactor the login procedure

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-30331: integrate the session manager with active users quota

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-30331: debug the solution

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-30332: POC for operations quota (#832)

* CORTX-30332: POC for operations quota

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-30332: update throttler middleware from POC to production

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-30332: set CSM request quota at Configure phase

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-30332: add sessions quota

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-30332: reserve some memory for CSM future needs

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-30332: resolve PR comments

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-30330: Resource Quota Update (#858)

* Modification for one session per user

Signed-off-by: abhijit1patil <abhijit.1.patil@seagate.com>

* Updated session expiry time and updated the req calulation formulae

Signed-off-by: abhijit1patil <abhijit.1.patil@seagate.com>

* Await update method

Signed-off-by: abhijit1patil <abhijit.1.patil@seagate.com>

* logs updated

Signed-off-by: abhijit1patil <abhijit.1.patil@seagate.com>

* CORTX-32714: resource limits amendments (#869)

* CORTX-32714: make active users quota configurable

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-32714: allow 'infinite' value for maximum number of users limit

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-32714: remove redundant sessions quota checks

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-32714: fix error description for active users quota

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-32714: make active users quota infinite by default

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

* Codacy Issue: _remove_expired_sessions signature updated

Signed-off-by: abhijit1patil <abhijit.1.patil@seagate.com>

* CORTX-33700: Handled exception in throttler middleware and added comments (#876)

* Handled exception in throttler middleware and added comments

Signed-off-by: abhijit1patil <abhijit.1.patil@seagate.com>

* Codacy Issue handled

Signed-off-by: abhijit1patil <abhijit.1.patil@seagate.com>

* Resource Limit is set to calculations (#877)

Signed-off-by: abhijit1patil <abhijit.1.patil@seagate.com>

* CORTX-33726: fix race condition on users quota check (#878)

Signed-off-by: Alexander Voronov <alexander.voronov@seagate.com>

Co-authored-by: Alexander Voronov <alexander.voronov@seagate.com>

* CORTX-33835: Fix CSM mini-provisioning failure (#880)

* Fixing user service initialisation

Signed-off-by: Rohit Kolapkar <rohit.j.kolapkar@seagate.com>

* User management test cases updated

Signed-off-by: Rohit Kolapkar <rohit.j.kolapkar@seagate.com>

Co-authored-by: Alexander Voronov <alexander.voronov@seagate.com>
Co-authored-by: Pawan Kumar Srivastava <pawan.kumarsrivastava@seagate.com>
Co-authored-by: abhijit1patil <abhijit.1.patil@seagate.com>
Co-authored-by: Alexander Voronov <alxndr.vrnv@gmail.com>
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants