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

fix(pool-mgmt): Removing stale CVR/CSP when dataset/pool does not exist #1587

Merged
merged 5 commits into from
Jan 28, 2020

Conversation

mynktl
Copy link
Contributor

@mynktl mynktl commented Jan 20, 2020

Changes:

  • When dataset or pool doesn't exist on zfs, cvr/csp controller should return success in case of dataset/pool deletion.

Signed-off-by: mayank mayank.patel@mayadata.io

What this PR does / why we need it:

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

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

Signed-off-by: mayank <mayank.patel@mayadata.io>
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

Copy link

@mittachaitu mittachaitu 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

Signed-off-by: mayank <mayank.patel@mayadata.io>
@mynktl
Copy link
Contributor Author

mynktl commented Jan 22, 2020

Logs for BDD if dataset doesn't exist
Running Suite: Test cstor volume provisioning

Random Seed: 1579701507
Will run 5 of 11 specs

STEP: waiting for maya-apiserver pod to come into running state
STEP: waiting for openebs-provisioner pod to come into running state
STEP: Verifying 'admission-server' pod status as running
STEP: building a namespace
STEP: creating a namespace
SSSSSS

[Cstor Volume Provisioning Negative] Volume Provisioning when SPC is created
cStor Pools Should be Provisioned
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:43
STEP: Build And Create StoragePoolClaim object
STEP: Creating SPC, Desired Number of CSP Should Be Created

• [SLOW TEST:6.371 seconds]
[Cstor Volume Provisioning Negative] Volume Provisioning
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:41
when SPC is created
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:42
cStor Pools Should be Provisioned
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:43

[Cstor Volume Provisioning Negative] Volume Provisioning when Service is Applied
Should Create Service
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:61
STEP: Creating Service To Inject Errors During Volume Provisioning

[Cstor Volume Provisioning Negative] Volume Provisioning when Volume provisioning with create/update error injection
All Volume Replicas Should Not Be Healthy
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:158
STEP: Provisioning a volume
STEP: Build And Create StorageClass
STEP: creating storageclass
STEP: Creating a PVC count 1
STEP: Creating PVC, Desired Number of CVR Should Be Created
STEP: Checking replica count after error injection
STEP: Checking replica count after error ejection
STEP: Deleting a volume

• [SLOW TEST:78.534 seconds]
[Cstor Volume Provisioning Negative] Volume Provisioning
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:41
when Volume provisioning with create/update error injection
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:105
All Volume Replicas Should Not Be Healthy
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:158

[Cstor Volume Provisioning Negative] Volume Provisioning when Volume provisioning with create/update error injection
CVR deletion in case of error injection
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:198
STEP: Provisioning a volume
STEP: Build And Create StorageClass
STEP: creating storageclass
STEP: Creating a PVC count 1
STEP: Creating PVC, Desired Number of CVR Should Be Created
STEP: Checking replica count
STEP: Deleting a volume

• [SLOW TEST:58.778 seconds]
[Cstor Volume Provisioning Negative] Volume Provisioning
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:41
when Volume provisioning with create/update error injection
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:105
CVR deletion in case of error injection
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:198

[Cstor Volume Provisioning Negative] Volume Provisioning when CleanUp Negative Volume Provisioned Resources
Should Delete All The Resources Related To Test
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/volume/provision_negative_test.go:211
STEP: Delete StoragePoolClaim then pool related resources should be deleted
•STEP: deleting namespace

Ran 5 of 11 Specs in 148.180 seconds
SUCCESS! -- 5 Passed | 0 Failed | 0 Pending | 6 Skipped
PASS

Ginkgo ran 1 suite in 2m32.955217558s
Test Suite Passed

@mynktl
Copy link
Contributor Author

mynktl commented Jan 23, 2020

fixes: openebs/openebs#2896

Signed-off-by: mayank <mayank.patel@mayadata.io>
@mynktl
Copy link
Contributor Author

mynktl commented Jan 23, 2020

Running Suite: Test cstor invalid config

Random Seed: 1579786448
Will run 1 of 6 specs

STEP: waiting for maya-apiserver pod to come into running state
STEP: waiting for openebs-provisioner pod to come into running state
STEP: Verifying 'admission-server' pod status as running
STEP: building a namespace
STEP: creating a namespace
SSSSS

[cstor] [-ve] TEST PROVISION WITHOUT POOL when creating storagepoolclaim without
Testing SPC deletion if pool does not exist
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/pool/negative/provision_without_pool.go:63
STEP: creating storagepoolclaim
STEP: Creating SPC, Desired Number of CSP Should Be Created
STEP: getting rest config
STEP: getting clientset
STEP: creating a POST request for executing command
STEP: processing request
STEP: deleting storagepoolclaim

• [SLOW TEST:10.770 seconds]
[cstor] [-ve] TEST PROVISION WITHOUT POOL
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/pool/negative/provision_without_pool.go:31
when creating storagepoolclaim without
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/pool/negative/provision_without_pool.go:62
Testing SPC deletion if pool does not exist
/home/mayank/go/src/github.com/openebs/maya/tests/cstor/pool/negative/provision_without_pool.go:63

STEP: deleting namespace

Ran 1 of 6 Specs in 13.457 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 5 Skipped
PASS

Ginkgo ran 1 suite in 20.527287027s
Test Suite Passed

Signed-off-by: mayank <mayank.patel@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

tests/cstor/volume/provision_negative_test.go Outdated Show resolved Hide resolved
tests/operations.go Show resolved Hide resolved
tests/cstor/volume/provision_negative_test.go Show resolved Hide resolved
Signed-off-by: mayank <mayank.patel@mayadata.io>
Copy link

@mittachaitu mittachaitu 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

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

@vishnuitta vishnuitta merged commit 491d9f4 into openebs-archive:master Jan 28, 2020
@mynktl mynktl deleted the stale branch January 28, 2020 08:44
@mynktl
Copy link
Contributor Author

mynktl commented Jan 28, 2020

For the steps about executing CVR debug test case, refer #1530

@vishnuitta vishnuitta added the pr/release-note PR should be included in release notes label Jan 28, 2020
@vishnuitta vishnuitta added this to the 1.7.0 milestone Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/release-note PR should be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants