Skip to content

Conversation

@ShravaniVangur
Copy link
Contributor

Describe what this PR does

Test PVC binding with WaitForFirstConsumer in Helm installation.

Is there anything that requires special attention

Do you have any questions?

Is the change backward compatible?

Are there concerns around backward compatibility?

Provide any external context for the change, if any.

For example:

  • Kubernetes links that explain why the change is required
  • CSI spec related changes/catch-up that necessitates this patch
  • golang related practices that necessitates this change

Related issues

Mention any github issues relevant to this PR. Adding below line
will help to auto close the issue once the PR is merged.

Fixes: #5127

Future concerns

List items that are not part of the PR and do not impact it's
functionality, but are work items that can be taken up subsequently.

Checklist:

  • Commit Message Formatting: Commit titles and messages follow
    guidelines in the developer
    guide
    .
  • Reviewed the developer guide on Submitting a Pull
    Request
  • Pending release
    notes

    updated with breaking and/or notable changes for the next major release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

Show available bot commands

These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:

  • /retest ci/centos/<job-name>: retest the <job-name> after unrelated
    failure (please report the failure too!)

@mergify mergify bot added component/testing Additional test cases or CI work component/deployment Helm chart, kubernetes templates and configuration Issues/PRs labels Mar 27, 2025
@ShravaniVangur
Copy link
Contributor Author

/test ci/centos/mini-e2e-operator/k8s-1.31

@iPraveenParihar
Copy link
Contributor

/test ci/centos/mini-e2e-helm/k8s-1.31

@ShravaniVangur
Copy link
Contributor Author

/test ci/centos/mini-e2e-helm/k8s-1.31

@ShravaniVangur
Copy link
Contributor Author

/test ci/centos/mini-e2e-helm/k8s-1.30

@ShravaniVangur ShravaniVangur marked this pull request as ready for review April 1, 2025 14:52
Copy link
Member

@nixpanic nixpanic left a comment

Choose a reason for hiding this comment

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

Looks quite complete, just added some general notes and suggestions for improving.

e2e/cephfs.go Outdated
}
})

By("verify PVC with volumeBindingMode on helm installation", func() {
Copy link
Member

Choose a reason for hiding this comment

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

What makes this special or unique for a Helm installation? This probably runs on non-Helm installations too? And, it should work on non-Helm installations as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test was added as a follow-up to PR #5126, which introduced changes to the CephFS charts. However, since the functionality should also be compatible with non-Helm installations, the test has been moved out of helmTest.

return createStorageClass(c, sc)
}

func updateStorageClassParameters(sc *scv1.StorageClass, params map[string]string, enablePool bool, f *framework.Framework) (*scv1.StorageClass, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Why return the StorageClass? The passed sc is updated, just as the function name indicates. The returned sc is not new (or a copy). Just return an error only to prevent any confusion.

if isRetryableAPIError(err) {
return false, nil
}

Copy link
Member

Choose a reason for hiding this comment

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

Here, an in other places, you removed an empty line before return. The coding style in Ceph-CSI (and golangci-lint?) expects these. Please add them back.

e2e/utils.go Outdated
return err
}

//verifies that the pvc is in pending state
Copy link
Member

Choose a reason for hiding this comment

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

Comments are mostly written with a space after //.

This comment here does not add much value, the function is pretty much self explaining. It would be better to add a comment above the function itself, which explains that validatePVCAndAppWaitForFirstConsumer 1st waits for pending, then starts an app and then makes sure the claim is bound.

e2e/utils.go Outdated
return wait.PollUntilContextTimeout(context.TODO(), poll, timeout, true, func(ctx context.Context) (bool, error) {
pvc, err := c.CoreV1().PersistentVolumeClaims(namespace).Get(context.TODO(), name, metav1.GetOptions{})
if err != nil {
return false, fmt.Errorf("error fetching PVC %s: %w", name, err)
Copy link
Member

Choose a reason for hiding this comment

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

nit: I have a preference to use %q for names of objects, instead of %s. It reads nicer when variables in error and log messages are quoted.

@ShravaniVangur
Copy link
Contributor Author

/test ci/centos/mini-e2e/k8s-1.30

Copy link
Collaborator

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

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

can we add the same for RBD as well (a follow up).

Copy link
Collaborator

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

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

LGTM. can you please add the same for RBD and NFS if its not present in follow up PR.

Madhu-1
Madhu-1 previously approved these changes Apr 17, 2025
nixpanic
nixpanic previously approved these changes Apr 23, 2025
@nixpanic
Copy link
Member

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Apr 23, 2025

queue

🛑 The pull request has been removed from the queue default

The pull request can't be updated.

You can take a look at Queue: Embarked in merge queue check runs for more details about the failure.

@mergify
Copy link
Contributor

mergify bot commented Apr 23, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated.

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

Test PVC binding with WaitForFirstConsumer in Helm installation.

Signed-off-by: ShravaniVangur <[email protected]>
@mergify mergify bot dismissed stale reviews from nixpanic and Madhu-1 April 24, 2025 05:55

Pull request has been modified.

@ShravaniVangur
Copy link
Contributor Author

@nixpanic @Madhu-1 Rebase was necessary due to recent changes in the Mergify.io configuration file. Kindly requesting reviews.

@nixpanic nixpanic requested a review from a team April 24, 2025 07:30
@Madhu-1
Copy link
Collaborator

Madhu-1 commented Apr 24, 2025

@Mergifyio queue

1 similar comment
@nixpanic
Copy link
Member

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Apr 24, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at c19f472

@mergify mergify bot added the ok-to-test Label to trigger E2E tests label Apr 24, 2025
@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-cephfs

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-rbd

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.31

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.32

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.31

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.31

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.32

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.32

@ceph-csi-bot ceph-csi-bot removed the ok-to-test Label to trigger E2E tests label Apr 24, 2025
@mergify mergify bot merged commit c19f472 into ceph:devel Apr 24, 2025
36 of 37 checks passed
@mergify
Copy link
Contributor

mergify bot commented Apr 24, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated.

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/deployment Helm chart, kubernetes templates and configuration Issues/PRs component/testing Additional test cases or CI work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E2E: helm PVC with volumeBindingMode: WaitForFirstConsumer

5 participants