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

feat(roThresholdLimit): add ROThresholdLimit support in pool manager #15

Merged

Conversation

mittachaitu
Copy link
Contributor

@mittachaitu mittachaitu commented Mar 12, 2020

Signed-off-by: mittachaitu [email protected]
This PR adds support for ROThresholdLimit in the pool manager.

Note:

  1. If roThresholdLimit is set to 0 or 100:
    • Writes on the pool will be allowed until it runs out of space.

Sample CSPI spec and status when pool in RW state

    poolConfig:
      ...
      ...
      roThresholdLimit: 12
  status:
    Conditions: null
    capacity:
      free: 9470M
      total: 9940M
      used: 476M
    phase: ""
    readOnly: false

Sample CSPI spec and status when pool is in RO mode

    poolConfig:
      ...
      ...
      roThresholdLimit: 2
  status:
    Conditions: null
    capacity:
      free: 9470M
      total: 9940M
      used: 476M
    phase: ""
    readOnly: true

Events Generation:

I0312 18:00:30.985242   19525 event.go:281] Event(v1.ObjectReference{Kind:"CStorPoolInstance", Namespace:"openebs", Name:"cspi-stripe", UID:"be8e517b-508d-4044-93bd-67e668593d4d", APIVersion:"cstor.openebs.io/v1", ResourceVersion:"1923", FieldPath:""}): type: 'Warning' reason: 'PoolReadOnlyThreshold' Pool storage limit reached to thresholdLimit. Pool expansion is required to make it's volume replicas RW
...
...
I0312 18:31:55.654584   26872 event.go:281] Event(v1.ObjectReference{Kind:"CStorPoolInstance", Namespace:"openebs", Name:"cspi-stripe", UID:"be8e517b-508d-4044-93bd-67e668593d4d", APIVersion:"cstor.openebs.io/v1", ResourceVersion:"3172", FieldPath:""}): type: 'Normal' reason: 'PoolReadOnlyThreshold' Pool roThresholdLimit or pool got expanded due to that pool readOnly mode is unset

TODO:
Fix travis after PR in api got merged.

@mittachaitu mittachaitu force-pushed the fix_ro_threshold_limit branch from dd65e4b to e1d33c5 Compare March 16, 2020 15:35
@mittachaitu mittachaitu self-assigned this Mar 17, 2020
@mittachaitu mittachaitu added help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Mar 17, 2020
mittachaitu added 3 commits March 21, 2020 12:40

Verified

This commit was signed with the committer’s verified signature.
DrJosh9000 Josh Deprez
Signed-off-by: mittachaitu <[email protected]>

Partially verified

This commit is signed with the committer’s verified signature.
DrJosh9000’s contribution has been verified via SSH key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
Signed-off-by: mittachaitu <[email protected]>
Copy link
Contributor

@sonasingh46 sonasingh46 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sonasingh46 sonasingh46 merged commit 146e4c2 into openebs-archive:master Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants