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(cspi): add provisioned and healthy replica count in CSPI status #99

Merged

Conversation

mittachaitu
Copy link
Contributor

@mittachaitu mittachaitu commented Jun 12, 2020

This PR adds Provisioned and Healthy
replica count present in the pool to CSPI status.
This will be helpful to the users to know no.of
replicas are present in the pool and out of them
Healthy replica count.

  • When users execute kubectl get cspi -n openebs below will be output
 kubectl get cspi -n openebs
NAME                HOSTNAME    ALLOCATED   FREE     CAPACITY    READONLY   PROVISIONEDREPLICAS   HEALTHYREPLICAS   STATUS   AGE
cstor-stripe-fb4b   127.0.0.1   190k        19200M   19200190k   false      2                     1                 ONLINE   36m

Provisioned Replicas: Count of volume replicas present in the pool.
Healthy Replicas: Count of Healthy volume replicas present in the pool.

Users will able to know provisioned and healthy replica count
without executing extra command kubectl get cvr -n openebs -l cstorpoolinstance.openebs.io/name=<cspi_name>

Note to reviewers:

  • Provisioned Replicas is calculated from the output of
    zfs list after filtering clones and pool name.
  • Healthy Replicas is calculated from using zfs stats
    which is json output.
  • ZFS Stats will give the status information of replica
    only if the dataset has target IP. If we get provisioned
    count of replicas from stats then there will be incorrect
    output when user is restoring the volumes to mitigate
    this we are fetching output from zfs list(which will give
    all the datasets).

Corresponding API repo PR: openebs-archive/api#54

Signed-off-by: mittachaitu sai.chaithanya@mayadata.io

@mittachaitu mittachaitu self-assigned this Jun 17, 2020
@mittachaitu mittachaitu changed the title [WIP] feat(cspi): add provisioned and healthy replica count in CSPI status feat(cspi): add provisioned and healthy replica count in CSPI status Jun 18, 2020
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

@mittachaitu
Copy link
Contributor Author

Sanity test needs to be enable in Travis

mittachaitu added 5 commits June 26, 2020 10:22
…tatus

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
@mittachaitu mittachaitu force-pushed the cspi_volume_replica_status branch from adbac55 to 8e832cb Compare June 26, 2020 04:54
@mittachaitu
Copy link
Contributor Author

Sanity test needs to be enable in Travis

Pushed commit to uncomment sanity test which was commented in PR #104

@sonasingh46 sonasingh46 merged commit 7874ede into openebs-archive:master Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants