Skip to content

Implementing watcher & reboot stability for data cache to master branch. #1946

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

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

halimsam
Copy link
Contributor

@halimsam halimsam commented Feb 20, 2025

What type of PR is this?
/kind feature

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
PR changes for Data Cache:
reboot stability
watcher for volume group cleanup
Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:
no

Data Cache feature: reboot stability and watcher for volume group cleanup. Also modified logic so that data cache logic only runs on node service.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 20, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 20, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @halimsam. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 20, 2025
@halimsam
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot
Copy link
Contributor

@halimsam: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/ok-to-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@sunnylovestiramisu
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 20, 2025
@@ -58,7 +58,7 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this updated manually or it is updated via go mod vendor and go mod tidy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it was from "go get github.com/fsnotify/fsnotify"

@@ -75,7 +65,7 @@ func setupCaching(devicePath string, req *csi.NodeStageVolumeRequest, nodeId str
klog.Errorf("Errored while deactivating VG %v: err: %v: %s", vgNameForPv, err, info)
}
// CLean up volume group to remove any dangling PV refrences
reduceVolumeGroup(vgNameForPv, false)
ReduceVolumeGroup(vgNameForPv, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no error returned for this function, only an error log. How do we get a signal of constant failures in the system? Do you plan to add a metrics here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ReduceVolumeGroup is only called for cleanup on PV/VG that are no longer in use. This isn't something that blocks overall data cache setup.

Copy link
Contributor

Choose a reason for hiding this comment

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

Any constant errors should ideally also bubble up in NodeStage/NodeUnstageVolume calls when we are mounting PVCs so even if we don't capture the errors at this stage they should appear in respective GRPC calls.

@sunnylovestiramisu
Copy link
Contributor

Can we change the release notes to 1 line: Data Cache feature: reboot stability and watcher for volume group cleanup

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 22, 2025
@halimsam halimsam force-pushed the master branch 3 times, most recently from 0286d08 to aad78f9 Compare February 25, 2025 22:37
@@ -75,7 +65,7 @@ func setupCaching(devicePath string, req *csi.NodeStageVolumeRequest, nodeId str
klog.Errorf("Errored while deactivating VG %v: err: %v: %s", vgNameForPv, err, info)
}
// CLean up volume group to remove any dangling PV refrences
reduceVolumeGroup(vgNameForPv, false)
ReduceVolumeGroup(vgNameForPv, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

Any constant errors should ideally also bubble up in NodeStage/NodeUnstageVolume calls when we are mounting PVCs so even if we don't capture the errors at this stage they should appear in respective GRPC calls.

@Sneha-at
Copy link
Contributor

/test pull-gcp-compute-persistent-disk-csi-driver-e2e

@halimsam halimsam force-pushed the master branch 2 times, most recently from b32e285 to cdd1023 Compare February 25, 2025 23:54
}

func StartWatcher(nodeName string) {
dirToWatch := "/dev/"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add some logs to indicate the start of a watcher.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a log.

// On error info contains the error message which we cannot use for further steps
}

if !strings.Contains(string(info), "/dev/md127") {
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be updated with the rabase?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already rebased. This function was part of my change. My change after Hung's PR got reversed but it should be fixed now.

@halimsam halimsam force-pushed the master branch 3 times, most recently from 2a4a0fb to c5e8f77 Compare February 26, 2025 21:04
@Sneha-at
Copy link
Contributor

/retest-required

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 27, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 27, 2025
@Sneha-at
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 27, 2025
@Sneha-at
Copy link
Contributor

The integration test is a known issue for snapshot test and is unrelated.

External Storage [Driver: csi-gcepd-sc-balanced--pd-volumesnapshotclass] [Testpattern: Dynamic Snapshot (delete policy)] snapshottable [Feature:VolumeSnapshotDataSource]

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 27, 2025
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Feb 27, 2025

@halimsam: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2019 7bb8b6f link false /test pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2019

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@sunnylovestiramisu
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 27, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: halimsam, sunnylovestiramisu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 27, 2025
@k8s-ci-robot k8s-ci-robot merged commit 11a1d38 into kubernetes-sigs:master Feb 27, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants