Skip to content

fix --automaxprocs flag not recognized #1397

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

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

Conversation

iPraveenParihar
Copy link

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

What this PR does / why we need it:

The automaxprocs flag was not being recognized due to incorrect initialization order.
Register the flag before merging Go flags with pflag to make it available for command-line parsing.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Fix --automaxprocs flag not being recognized due to incorrect initialization order

The automaxprocs flag was not being recognized due to incorrect
initialization order. Register the flag before merging Go flags
with pflag to make it available for command-line parsing.

Signed-off-by: Praveen M <30765265+iPraveenParihar@users.noreply.github.com>
@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jul 12, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: iPraveenParihar
Once this PR has been reviewed and has the lgtm label, please assign jsafrane for approval. For more information see the 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

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 12, 2025
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 12, 2025
@k8s-ci-robot
Copy link
Contributor

Welcome @iPraveenParihar!

It looks like this is your first PR to kubernetes-csi/external-provisioner 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-csi/external-provisioner has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@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 Jul 12, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @iPraveenParihar. 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 12, 2025
@iPraveenParihar
Copy link
Author

$ docker run --rm registry.k8s.io/sig-storage/csi-provisioner:v5.3.0 --automaxprocs
unknown flag: --automaxprocs

After the change

$ docker run --rm csi-provisioner:latest --automaxprocs
I0712 07:53:41.170833       1 automaxprocs.go:51] maxprocs: Leaving GOMAXPROCS=2: CPU quota undefined
I0712 07:53:41.170975       1 csi-provisioner.go:168] "Version" version="v5.3.0-0-g1a7e93814-dirty"

@Madhu-1
Copy link
Contributor

Madhu-1 commented Jul 14, 2025

/ok-to-test
/lgtm
/assign @jsafrane

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jul 14, 2025
@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 14, 2025
@iPraveenParihar
Copy link
Author

The E2E failures are not related to changes from this PR. I'm not sure if these failures are flaking.
But I have seen, similar failures from other csi sidecar repos.

Kubernetes e2e suite: [It] External Storage [Driver: hostpath.csi.k8s.io] [Testpattern: Dynamic PV (block volmode)(allowExpansion)] volume-expand Verify if offline PVC expansion works expand_less | 2m20s
-- | --
{ failed [FAILED] While waiting for pvc to have fs resizing condition: error waiting for pvc "hostpath.csi.k8s.iofb6fk" to have filesystem resize status: error fetching pvc "hostpath.csi.k8s.iofb6fk" for checking for resize status : client rate limiter Wait returned an error: context deadline exceeded In [It] at: k8s.io/kubernetes/test/e2e/storage/testsuites/volume_expand.go:238 @ 07/14/25 07:47:12.058 }

@Madhu-1
Copy link
Contributor

Madhu-1 commented Jul 15, 2025

@gnufied might know if it's a known failures

@gnufied
Copy link
Contributor

gnufied commented Jul 15, 2025

/retest

@gnufied
Copy link
Contributor

gnufied commented Jul 15, 2025

The e2e tests should be fixed with kubernetes/test-infra#35137

@Madhu-1
Copy link
Contributor

Madhu-1 commented Jul 15, 2025

/test pull-kubernetes-csi-external-provisioner-unit

@iPraveenParihar
Copy link
Author

iPraveenParihar commented Jul 15, 2025

/test pull-kubernetes-csi-external-provisioner-unit

go test -mod=vendor `go list -mod=vendor ./... | grep -v -e 'vendor' -e '/test/e2e$' ` -race
ok  	github.com/kubernetes-csi/external-provisioner/v5/cmd/csi-provisioner	1.603s
ok  	github.com/kubernetes-csi/external-provisioner/v5/pkg/capacity	25.726s
--- FAIL: TestNodeTopology (60.22s)
    --- FAIL: TestNodeTopology/add-node (60.00s)
        nodes_test.go:551: unexpected error: get informers in sync: timed out waiting for the condition
FAIL
FAIL	github.com/kubernetes-csi/external-provisioner/v5/pkg/capacity/topology	60.537s
ok  	github.com/kubernetes-csi/external-provisioner/v5/pkg/controller	29.792s
?   	github.com/kubernetes-csi/external-provisioner/v5/pkg/features	[no test files]
ok  	github.com/kubernetes-csi/external-provisioner/v5/pkg/owner	1.162s
?   	github.com/kubernetes-csi/external-provisioner/v5/release-tools	[no test files]
?   	github.com/kubernetes-csi/external-provisioner/v5/test/e2e/storage	[no test files]
FAIL

failure seems to be flaky, TestNodeTopology/add-node passes locally

Running tool: /usr/local/go/bin/go test -timeout 30s -run ^TestNodeTopology$ github.com/kubernetes-csi/external-provisioner/v5/pkg/capacity/topology

=== RUN   TestNodeTopology
=== RUN   TestNodeTopology/remove-driver
--- PASS: TestNodeTopology/remove-driver (0.00s)
=== RUN   TestNodeTopology/one-node
--- PASS: TestNodeTopology/one-node (0.00s)
=== RUN   TestNodeTopology/missing-node
--- PASS: TestNodeTopology/missing-node (0.00s)
=== RUN   TestNodeTopology/missing-node-labels
--- PASS: TestNodeTopology/missing-node-labels (0.00s)
=== RUN   TestNodeTopology/two-nodes
--- PASS: TestNodeTopology/two-nodes (0.00s)
=== RUN   TestNodeTopology/other-shared-storage
--- PASS: TestNodeTopology/other-shared-storage (0.00s)
=== RUN   TestNodeTopology/partial-match
--- PASS: TestNodeTopology/partial-match (0.00s)
=== RUN   TestNodeTopology/unsorted-keys
--- PASS: TestNodeTopology/unsorted-keys (0.00s)
=== RUN   TestNodeTopology/add-driver
--- PASS: TestNodeTopology/add-driver (0.00s)
=== RUN   TestNodeTopology/missing-csi-node
--- PASS: TestNodeTopology/missing-csi-node (0.00s)
=== RUN   TestNodeTopology/deep-topology
--- PASS: TestNodeTopology/deep-topology (0.00s)
=== RUN   TestNodeTopology/mixed-topology
--- PASS: TestNodeTopology/mixed-topology (0.00s)
=== RUN   TestNodeTopology/empty
--- PASS: TestNodeTopology/empty (0.00s)
=== RUN   TestNodeTopology/remove-node
--- PASS: TestNodeTopology/remove-node (0.00s)
=== RUN   TestNodeTopology/update-node
--- PASS: TestNodeTopology/update-node (0.00s)
=== RUN   TestNodeTopology/update-csi-node
--- PASS: TestNodeTopology/update-csi-node (0.00s)
=== RUN   TestNodeTopology/add-node
--- PASS: TestNodeTopology/add-node (0.00s)
=== RUN   TestNodeTopology/add-csi-node
--- PASS: TestNodeTopology/add-csi-node (0.00s)
=== RUN   TestNodeTopology/change-labels
--- PASS: TestNodeTopology/change-labels (0.00s)
=== RUN   TestNodeTopology/shared-storage
--- PASS: TestNodeTopology/shared-storage (0.00s)
=== RUN   TestNodeTopology/wrong-driver
--- PASS: TestNodeTopology/wrong-driver (0.00s)
=== RUN   TestNodeTopology/remove-csi-node
--- PASS: TestNodeTopology/remove-csi-node (0.00s)
--- PASS: TestNodeTopology (0.05s)
PASS
ok      github.com/kubernetes-csi/external-provisioner/v5/pkg/capacity/topology

cc @gnufied

@gnufied
Copy link
Contributor

gnufied commented Jul 15, 2025

I think that is a test that is badly written and you are just running into this right now. We will have to fix it or hope the flake goes away.

@Rakshith-R
Copy link

/retest

@iPraveenParihar
Copy link
Author

🤞 Job passed finally.
@Rakshith-R Can I get the approval?

@Rakshith-R
Copy link

🤞 Job passed finally. @Rakshith-R Can I get the approval?

/cc @jsafrane @gnufied

@k8s-ci-robot k8s-ci-robot requested review from gnufied and jsafrane July 16, 2025 13:15
@iPraveenParihar
Copy link
Author

/assign @gnufied
can you provide the approval?

@nixpanic
Copy link
Member

Thanks!

/lgtm

@iPraveenParihar
Copy link
Author

@nixpanic, tide job complains about missing label approved?

@Madhu-1
Copy link
Contributor

Madhu-1 commented Jul 24, 2025

/assign @xing-yang for review

@Madhu-1
Copy link
Contributor

Madhu-1 commented Jul 24, 2025

/assign @xing-yang

@nixpanic
Copy link
Member

@nixpanic, tide job complains about missing label approved?

Yes, someone in the kubernetes-csi-approvers list needs to approve it.

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. 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants