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(bdd): fix BDD to avoid failures during creation of Storage Class #1652

Merged
merged 1 commit into from
Apr 6, 2020

Conversation

mittachaitu
Copy link

Signed-off-by: mittachaitu [email protected]

What this PR does:
This PR fixes the Runtime issues in creating StorageClass.

Why we need it:
This PR adds VolumeBindingMode only if it is not empty. This problem was introduced in PR: 1643
Error:

 while creating storageclass {test-cstor-replica-scaleup-sc}
    Expected
        <*errors.StatusError | 0xc0001cea00>: {
            ErrStatus: {
                TypeMeta: {Kind: "", APIVersion: ""},
                ListMeta: {
                    SelfLink: "",
                    ResourceVersion: "",
                    Continue: "",
                    RemainingItemCount: nil,
                },
                Status: "Failure",
                Message: "StorageClass.storage.k8s.io \"test-cstor-replica-scaleup-sc-lskrg\" is invalid: volumeBindingMode: Unsupported value: \"\": supported values: \"Immediate\", \"WaitForFirstConsumer\"",
                Reason: "Invalid",
                Details: {
                    Name: "test-cstor-replica-scaleup-sc-lskrg",
                    Group: "storage.k8s.io",
                    Kind: "StorageClass",
                    UID: "",
                    Causes: [
                        {
                            Type: "FieldValueNotSupported",
                            Message: "Unsupported value: \"\": supported values: \"Immediate\", \"WaitForFirstConsumer\"",
                            Field: "volumeBindingMode",
                        },
                    ],
                    RetryAfterSeconds: 0,
                },
                Code: 422,
            },
        }
    to be nil

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

@mittachaitu
Copy link
Author

Tested locally and this fix will fix BDD issue

sai@sai:~/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica$ ginkgo -v -- -kubeconfig=/home/sai/.kube/config -cstor-maxpools=3 -cstor-replicas=2
Running Suite: Test cstor volume provisioning
=============================================
Random Seed: 1586167764
Will run 5 of 5 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
[REPLICA SCALEUP/SCALEDOWN] CSTOR REPLICA SCALEUP And SCALEDOWN when SPC is created 
  cStor Pools Should be Provisioned 
  /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:34
STEP: Build And Create StoragePoolClaim object
STEP: Creating SPC, Desired Number of CSP Should Be Created

• [SLOW TEST:34.439 seconds]
[REPLICA SCALEUP/SCALEDOWN] CSTOR REPLICA SCALEUP And SCALEDOWN
/home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:32
  when SPC is created
  /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:33
    cStor Pools Should be Provisioned 
    /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:34
------------------------------
[REPLICA SCALEUP/SCALEDOWN] CSTOR REPLICA SCALEUP And SCALEDOWN when Persistent Volume Claim Is Created 
  Volume Should be Created and Provisioned
  /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:53
STEP: Build And Create StorageClass
STEP: Creating PVC, Desired Number of CVR Should Be Created

• [SLOW TEST:45.244 seconds]
[REPLICA SCALEUP/SCALEDOWN] CSTOR REPLICA SCALEUP And SCALEDOWN
/home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:32
  when Persistent Volume Claim Is Created
  /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:52
    Volume Should be Created and Provisioned
    /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:53
------------------------------
[REPLICA SCALEUP/SCALEDOWN] CSTOR REPLICA SCALEUP And SCALEDOWN when CStor Replica ScaledUp 
  Volume Replica Should Become Healthy and CStor Volume Configurations Should Be Updated
  /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:81
STEP: Update DesiredReplicationFactor
STEP: Build and Create CStorVolumeReplica
STEP: Verify Volume Status after ScaleUp Replica
STEP: Verify Volume configurations from cstor volume

• [SLOW TEST:24.590 seconds]
[REPLICA SCALEUP/SCALEDOWN] CSTOR REPLICA SCALEUP And SCALEDOWN
/home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:32
  when CStor Replica ScaledUp
  /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:80
    Volume Replica Should Become Healthy and CStor Volume Configurations Should Be Updated
    /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:81
------------------------------
[REPLICA SCALEUP/SCALEDOWN] CSTOR REPLICA SCALEUP And SCALEDOWN when CStor Replica ScaleDown 
  Volume Replica Should be disconnected and CStor Volume Configurations Should Be Updated
  /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:96
STEP: Update cStor Volume Configurations
STEP: Verify CStorVolume Configurations After Performing Scaledown
STEP: Verify Volume Status after ScaleDown Replica

• [SLOW TEST:23.887 seconds]
[REPLICA SCALEUP/SCALEDOWN] CSTOR REPLICA SCALEUP And SCALEDOWN
/home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:32
  when CStor Replica ScaleDown
  /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:95
    Volume Replica Should be disconnected and CStor Volume Configurations Should Be Updated
    /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:96
------------------------------
[REPLICA SCALEUP/SCALEDOWN] CSTOR REPLICA SCALEUP And SCALEDOWN when Clean up test resources 
  Test related resources should be cleanedup
  /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:116
STEP: Delete persistentVolumeClaim then volume resources should be deleted
STEP: Delete StoragePoolClaim then pool related resources should be deleted

• [SLOW TEST:40.826 seconds]
[REPLICA SCALEUP/SCALEDOWN] CSTOR REPLICA SCALEUP And SCALEDOWN
/home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:32
  when Clean up test resources
  /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:115
    Test related resources should be cleanedup
    /home/sai/gocode/src/github.com/openebs/maya/tests/cstor/volume/scaleup_replica/scaleup_replica_test.go:116
------------------------------
STEP: deleting namespace

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

Ginkgo ran 1 suite in 2m56.575265154s
Test Suite Passed

Copy link
Contributor

@prateekpandey14 prateekpandey14 left a comment

Choose a reason for hiding this comment

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

lgtm

@prateekpandey14 prateekpandey14 merged commit 441cf16 into openebs-archive:master Apr 6, 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