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(pendingsnapshots): add pending snapshots on CVR by talking to peer replicas #1641

Merged

Conversation

mittachaitu
Copy link

@mittachaitu mittachaitu commented Mar 31, 2020

What this PR does / why we need it:
This PR adds the pending snapshots under CVR status.pendingsnapshots only if CVR underwent Rebuilding. This PR is continuation of PR #1639.

How Does It Gets Pending Snapshots:
The replica which is undergoing rebuilding will get the list of pending snapshots from other peer CVR's Snapshot information.

Sample YAML output when Rebuilding is in Progress:

apiVersion: openebs.io/v1alpha1
  kind: CStorVolumeReplica
  metadata:
    annotations:
      cstorpool.openebs.io/hostname: e2e1-node3
      isRestoreVol: "false"
      openebs.io/storage-class-ref: |
        name: single-sc
        resourceVersion: 41963
    creationTimestamp: "2020-04-01T09:47:53Z"
    finalizers:
    - cstorvolumereplica.openebs.io/finalizer
    generation: 9
    labels:
      cstorpool.openebs.io/name: cstor-sparse-pool-uw8i
      cstorpool.openebs.io/uid: ccc2be88-fa06-4cb6-9f64-ef5e6fd196c4
      cstorvolume.openebs.io/name: pvc-ffb6210a-dae5-4186-899f-f7f8333d24dd
      openebs.io/cas-template-name: cstor-volume-create-default-1.8.0
      openebs.io/persistent-volume: pvc-ffb6210a-dae5-4186-899f-f7f8333d24dd
      openebs.io/version: 1.8.0
    name: pvc-ffb6210a-dae5-4186-899f-f7f8333d24dd-cstor-sparse-pool-uw8i
    namespace: openebs
    resourceVersion: "78191"
    selfLink: /apis/openebs.io/v1alpha1/namespaces/openebs/cstorvolumereplicas/pvc-ffb6210a-dae5-4186-899f-f7f8333d24dd-cstor-sparse-pool-uw8i
    uid: 4131e38d-a31e-4c5d-beb1-d3ab255609d1
  spec:
    capacity: 5G
    replicaid: 9AB518DBF9730BDB258296E3D41178A8
    targetIP: 10.106.163.180
    zvolWorkers: ""
  status:
    capacity:
      totalAllocated: 192M
      used: 275M
    lastTransitionTime: "2020-04-01T09:59:42Z"
    lastUpdateTime: "2020-04-01T09:59:42Z"
    pendingSnapshots:
      istgt_snap2:
        compression: 1.30x
        logicalReferenced: 417277952
        referenced: 319405568
        used: 536576
        written: 173701632
    phase: Rebuilding
    snapshots:
      istgt_snap1:
        compression: 1.52x
        logicalReferenced: 232120832
        referenced: 152257024
        used: 1030656
        written: 152257024
  versionDetails:
    autoUpgrade: false
    desired: 1.8.0
    status:
      current: 1.8.0
      dependentsUpgraded: true
      lastUpdateTime: null
      state: ""

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes openebs/openebs#2936 (Part of the issue will be fixed).

Special notes for your reviewer:

  • The test case will be covered in different PR.

Checklist:

  • Fixes #
  • Labelled this PR & related issue with documentation tag
  • PR messages has document related information
  • Labelled this PR & related issue with breaking-changes tag
  • PR messages has breaking changes related information
  • Labelled this PR & related issue with requires-upgrade tag
  • PR messages has upgrade related information
  • Commit has unit tests
  • Commit has integration tests

mittachaitu added 2 commits March 31, 2020 17:52
…er replicas

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Copy link
Contributor

@vishnuitta vishnuitta left a comment

Choose a reason for hiding this comment

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

changes are good..
asked for a fn name change, and few logs

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
@mittachaitu mittachaitu self-assigned this Apr 1, 2020
@mittachaitu mittachaitu added this to the 1.9 milestone Apr 1, 2020
Copy link
Contributor

@vishnuitta vishnuitta left a comment

Choose a reason for hiding this comment

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

changes are good

@mynktl mynktl added the pr/hold-merge Hold on the merge to complete few activities. label Apr 1, 2020
@mittachaitu mittachaitu added pr/ready-to-merge PR has enough approvals and ready to merge and removed pr/hold-merge Hold on the merge to complete few activities. labels Apr 1, 2020
@vishnuitta vishnuitta merged commit 52f479a into openebs-archive:master Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/ready-to-merge PR has enough approvals and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rebuild estimate for cstor replica
3 participants