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

PWX-36514: Integration test to validate node pdb #1600

Merged
merged 5 commits into from
Jul 24, 2024
Merged

Conversation

svijaykumar-px
Copy link
Contributor

@svijaykumar-px svijaykumar-px commented Jul 9, 2024

What this PR does / why we need it: This PR adds integration tests to validate Node PDBs as a part of Smart and Parallel Upgrades in 24.2.0

Which issue(s) this PR fixes (optional)
Closes # PWX-36514, PWX-37561

Special notes for your reviewer: The tests covered by this PR are mentioned in this testrail link
This is the link for jenkins job of the test

Copy link

codecov bot commented Jul 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 55 lines in your changes missing coverage. Please review.

Project coverage is 75.59%. Comparing base (5b34b43) to head (803b401).

Files Patch % Lines
test/integration_test/utils/k8s.go 0.00% 40 Missing ⚠️
test/integration_test/utils/utils.go 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1600      +/-   ##
==========================================
- Coverage   75.75%   75.59%   -0.17%     
==========================================
  Files          77       77              
  Lines       20813    20858      +45     
==========================================
  Hits        15767    15767              
- Misses       3922     3967      +45     
  Partials     1124     1124              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

This PR is stale because it has been in review for 3 days with no activity.

}
}

func NodePDBDisablingParallelUpgrade(tc *types.TestCase) func(*testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What are we trying to test here? Are we just checking that the number is less that k8snodecount - 1? This would mean that we will wait for the entire upgrade timeout to validate that. That would be a long running test.

Copy link
Contributor Author

@svijaykumar-px svijaykumar-px Jul 19, 2024

Choose a reason for hiding this comment

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

All the tests in the operator do not actually perform the k8s upgrade. This just checks the nodes that are selected for upgrade (ones which have PDB minAvailable 0). Since the operator can only control this and the nodes actually selected are not under its control.

@github-actions github-actions bot added size/l and removed size/m labels Jul 19, 2024
@svijaykumar-px svijaykumar-px requested review from piyush-nimbalkar and a team July 19, 2024 14:11
// Smart and parallel upgrades is supported from px version 3.1.2 and operator version 24.2.0
if k8sVersion.GreaterThanOrEqual(minSupportedK8sVersionForPdb) && opVersion.GreaterThanOrEqual(opVer24_2_0) && pxVersion.GreaterThanOrEqual(pxVer3_1_2) {
t := func() (interface{}, bool, error) {
nodes, err := operatorops.Instance().ListStorageNodes(cluster.Namespace)
Copy link
Contributor

Choose a reason for hiding this comment

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

are these going to be PX StorageNodes (kubectl get sn) or kubernetes nodes (kubectl get nodes)?
what will be the output of this ?

Copy link
Contributor

@nikita-bhatia nikita-bhatia left a comment

Choose a reason for hiding this comment

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

LGTM

@svijaykumar-px svijaykumar-px merged commit a6ffcfc into master Jul 24, 2024
7 of 9 checks passed
@svijaykumar-px svijaykumar-px deleted the PWX-36514 branch July 24, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants