-
Notifications
You must be signed in to change notification settings - Fork 99
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
Workaround to set IOPS, BPS limit for Pod accessing a Volume #19
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
praveengt
reviewed
Feb 10, 2021
praveengt
reviewed
Feb 10, 2021
pawanpraka1
reviewed
Feb 23, 2021
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.
@abhranilc what will happen if I have not set the limits for few volume groups?
pawanpraka1
approved these changes
Mar 2, 2021
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.
looks good.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request template
Please, go through these steps before you submit a PR.
Why is this PR required? What issue does it fix?:
Currently there is no way to limit Iops for a Pod on LVs created on a physical volume thereby making it impossible for multiple Pods to use respective LVs on a shared physical volume with iops limits or guarantees.
What this PR does?:
This PR introduces change to set an optional parameter --setiolimits in open-lvm-plugin container along with some static iops rates configured for volume groups. This is used
Does this PR require any upgrade changes?:
CSIDriver.Spec needs to be updated in lvm-operator deployment to make podInfoOnMount: true. If not, then while attempting to set io limits, a Warning will be logged as pod.uid will not be available in NodePublishVolume gRPC request.
New CSIDriver definition:
Create the CSI Driver object
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: local.csi.openebs.io
spec:
do not require volumeattachment
attachRequired: false
podInfoOnMount: true
New definition for openebs-lvm-container:
- name: openebs-lvm-plugin
securityContext:
privileged: true
allowPrivilegeEscalation: true
image: abhranilc/lvm-driver:iops-test9
imagePullPolicy: IfNotPresent
args:
- "--nodeid=$(OPENEBS_NODE_ID)"
- "--endpoint=$(OPENEBS_CSI_ENDPOINT)"
- "--plugin=$(OPENEBS_NODE_DRIVER)"
- "--setiolimits"
- "--container-runtime=$(CONTAINER_RUNTIME)"
- "--riops-per-gb=$(RIOPS_PER_GB)"
- "--wiops-per-gb=$(WIOPS_PER_GB)"
env:
- name: OPENEBS_NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: OPENEBS_CSI_ENDPOINT
value: unix:///plugin/csi.sock
- name: OPENEBS_NODE_DRIVER
value: agent
- name: LVM_NAMESPACE
value: openebs
- name: CONTAINER_RUNTIME
value: containerd
- name: RIOPS_PER_GB
value: lvmvg1:65,lvmvg3:60
- name: WIOPS_PER_GB
value: lvmvg1:70,lvmvg3:65
If the changes in this PR are manually verified, list down the scenarios covered::
Scenario 1: setting io limits not enabled, no change in expected behaviour
Scenario2: setting only iops
Scenario3: setting both iops, bps
Any additional information for your reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
This PR uses changes in openebs-lib-csi PR openebs/lib-csi#3
Checklist:
<type>(<scope>): <subject>
PLEASE REMOVE BELOW INFORMATION BEFORE SUBMITTING
The PR title message must follow convention:
<type>(<scope>): <subject>
.Where:
type
is defining if release will be triggering after merging submitted changes, details in CONTRIBUTING.md.Most common types are:
feat
- for new features, not a new feature for build scriptfix
- for bug fixes or improvements, not a fix for build scriptchore
- changes not related to production codedocs
- changes related to documentationstyle
- formatting, missing semi colons, linting fix etc; no significant production code changestest
- adding missing tests, refactoring tests; no production code changerefactor
- refactoring production code, eg. renaming a variable or function name, there should not be any significant production code changesscope
is a single word that best describes where the changes fit.Most common scopes are like:
localpv
,jiva
,cstor
)provisioning
,backup
,restore
,exporter
)api
,webhook
,cast
,upgrade
)tests
,bdd
)version
,build
,log
,travis
)subject
is a single line brief description of the changes made in the pull request.