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

test(volgroup_vgpattern_bdd): adding feature file #313

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

abhilashshetty04
Copy link
Member

What this PR does?:
This PR includes bdd specification for volgroup and vgpattern based test

Does this PR require any upgrade changes?:
NA
If the changes in this PR are manually verified, list down the scenarios covered::
NA

Given a sc is created with volgroup as "lvmvg"
And pvc is created referencing the same sc
Then lvmvolume cr should get created
And cr state should be Ready
Copy link
Member

Choose a reason for hiding this comment

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

Is it worth using some application or it's maybe fine as this focuses on the vg configs.

Copy link
Member Author

Choose a reason for hiding this comment

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

This just focuses on scheduling. However, I have added one case for testing WairForFirstConsumer. That will require a pod.

@abhilashshetty04 abhilashshetty04 requested a review from w3aman June 18, 2024 05:18

Scenario: test sc with volgroup present on the node
Given a sc is created with volgroup as "lvmvg"
And pvc is created referencing the same sc
Copy link
Contributor

Choose a reason for hiding this comment

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

let's use full forms of these abbreviations throughout sc -> storage class , cr -> custom resource, pvc -> volume

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay....will keep pvc as is, making it volume might not be clearly referencing it to pvc.

Copy link
Member Author

Choose a reason for hiding this comment

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

On the second thought, These all are k8s recognised shortforms. Could be okay to keep all as is??

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, but bdds are kind of generic and not k8s specific. You can refer maybe Mayastor bdds, if they use similar terminology, let's keep that.

Comment on lines 39 to 34
Given "lvmvg" has lesser free space then "lvmvg1"
And sc is created with volgroup as "lvmvg"
When a pvc is created with size higher then "lvmvg" and lower then "lvmvg1" free space
Then pvc should not be bound
And lvmvolume cr should not be created
Copy link
Contributor

Choose a reason for hiding this comment

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

The mention of lvmvg1 is irrelevant here since sc will mention lvmvg and pvc just needs to be larger than free space on lvmvg

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to emphasize that there is another vg on the node which would not match pattern but has more free space to accomodate the pvc requested size..

Copy link
Member Author

Choose a reason for hiding this comment

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

I have changed it a little. Please check.


Scenario: test sc with volgroup present on the node
Given a sc is created with volgroup as "lvmvg"
And pvc is created referencing the same sc
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, but bdds are kind of generic and not k8s specific. You can refer maybe Mayastor bdds, if they use similar terminology, let's keep that.


Background:
Given a 3 node lvm localpv cluster is configured
And each node has vg named "lvmvg"
Copy link
Contributor

Choose a reason for hiding this comment

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

we'll keep this vg only on the node having custom label, and not on each node.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should that matter? Even if its on other nodes also, We will validate eventually lvmvolume schedules on expected node.

@abhilashshetty04 abhilashshetty04 force-pushed the volgroup_vgpattern_bdd branch from 14c1a4c to a5d6226 Compare June 24, 2024 12:28
@abhilashshetty04 abhilashshetty04 merged commit 0940723 into develop Jun 24, 2024
10 checks passed
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.

4 participants