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

Failing closed after maximum retry is achieved to avoid inf recursion #336

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

knabben
Copy link

@knabben knabben commented Apr 16, 2024

What type of PR is this?

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
/kind bug

What this PR does / why we need it:
Adding a maximum retry for the CSI to find the volume target from a mountpath.

Which issue(s) this PR fixes:

Fixes #193

Special notes for your reviewer:
Tracking the recursion call trace here:
#193 (comment)

Does this PR introduce a user-facing change?:

Maximum retry (3) when for the getTarget method iterate and find the correct volume of the mount path. 

@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/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 16, 2024
@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 Apr 16, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @knabben. Thanks for your PR.

I'm waiting for a kubernetes-csi 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 16, 2024
@knabben
Copy link
Author

knabben commented Apr 16, 2024

/assign @mauriciopoppe

"testing"
)

func TestGetTarget(t *testing.T) {
Copy link
Author

Choose a reason for hiding this comment

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

This (and other calls) needs a real coverage

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, it'd be hard to setup a scenario with symlinks so that (Get-Item -Path $Env:mountpath).Target works though.

@jsturtevant
Copy link
Contributor

/ok-to-test

@k8s-ci-robot
Copy link
Contributor

@jsturtevant: 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/test-infra repository.

@mauriciopoppe
Copy link
Member

/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 Apr 25, 2024
pkg/os/volume/api.go Outdated Show resolved Hide resolved
pkg/os/volume/api.go Outdated Show resolved Hide resolved
pkg/os/volume/api.go Outdated Show resolved Hide resolved
pkg/os/volume/api.go Show resolved Hide resolved
pkg/os/volume/api.go Outdated Show resolved Hide resolved
"testing"
)

func TestGetTarget(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Agreed, it'd be hard to setup a scenario with symlinks so that (Get-Item -Path $Env:mountpath).Target works though.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: knabben
Once this PR has been reviewed and has the lgtm label, please ask for approval from mauriciopoppe. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@mauriciopoppe
Copy link
Member

I believe CI is failing because the kubernetes startup script on GCE instances is not working for Windows, cc @AnishShah

@AnishShah
Copy link

I had filed kubernetes/kubernetes#124047 to track sig-windows-gce test job failures.

@mauriciopoppe
Copy link
Member

/retest

@knabben
Copy link
Author

knabben commented Jun 25, 2024

@mauriciopoppe any news in the gcp windows testing?

@mauriciopoppe
Copy link
Member

Thanks for following up, our CI infra is up and running but a presubmit within Github Actions failed with tests unrelated with this change:

=== RUN   TestSmbAPIGroup/v1alpha1SmbTests
    smb_v1alpha1_test.go:30: TestSmbAPIGroup setupUser failed: exit status 1, output: "ConvertTo-SecureString : The 'ConvertTo-SecureString' command was found in the module 'Microsoft.PowerShell.Security', \r\nbut the module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Security'.\r\nAt line:1 char:10\r\n+ $PWord = ConvertTo-SecureString $Env:password -AsPlainText -Force;New ...\r\n+          ~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : ObjectNotFound: (ConvertTo-SecureString:String) [], CommandNotFoundException\r\n    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule\r\n \r\nNew-LocalUser : Cannot validate argument on parameter 'Password'. The argument is null. Provide a valid value for the \r\nargument, and then try running the command again.\r\nAt line:1 char:132\r\n+ ... w-Localuser -name $Env:username -accountneverexpires***                                                                    ~~~~~~\r\n    + CategoryInfo          : InvalidData: (:) [New-LocalUser], ParameterBindingValidationException\r\n    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.NewLocalUserCommand\r\n \r\n"

The failure above (only CI setup in Github actions) would need to be fixed in another PR and then we can retrigger presubmit tests in this PR to finally get it merged.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

High cpu usage of powershell processes triggered by csi-proxy
6 participants