-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Add kubectlPath flag to e2e_node.test #82308
Conversation
@zhlhahaha: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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. |
Hi @zhlhahaha. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
/ok-to-test |
/assign @tallclair |
/kind failing-test |
test/e2e_node/e2e_node_suite_test.go
Outdated
@@ -61,6 +61,7 @@ var runServicesMode = flag.Bool("run-services-mode", false, "If true, only run s | |||
var runKubeletMode = flag.Bool("run-kubelet-mode", false, "If true, only start kubelet, and not run test.") | |||
var systemValidateMode = flag.Bool("system-validate-mode", false, "If true, only run system validation in current process, and not run test.") | |||
var systemSpecFile = flag.String("system-spec-file", "", "The name of the system spec file that will be used for node conformance test. If it's unspecified or empty, the default system spec (system.DefaultSysSpec) will be used.") | |||
var kubectlPath = flag.String("kubectl-path", "kubectl", "The kubectl binary to use. For development, you might use 'cluster/kubectl.sh' here.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than adding the flag here, move the cluster flag to common flags:
kubernetes/test/e2e/framework/test_context.go
Line 311 in 0c9288e
flags.StringVar(&TestContext.KubectlPath, "kubectl-path", "kubectl", "The kubectl binary to use. For development, you might use 'cluster/kubectl.sh' here.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
5369759
to
203a5a0
Compare
/retest |
1 similar comment
/retest |
/retest |
2 similar comments
/retest |
/retest |
test/e2e_node/e2e_node_suite_test.go
Outdated
@@ -66,6 +66,7 @@ func init() { | |||
e2econfig.CopyFlags(e2econfig.Flags, flag.CommandLine) | |||
framework.RegisterCommonFlags(flag.CommandLine) | |||
framework.RegisterNodeFlags(flag.CommandLine) | |||
framework.RegisterClusterFlags(flag.CommandLine) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you misunderstood my previous comment. ClusterFlags are not relevant to the node e2e suite, so they shouldn't be registered here. The flags that are common to both suites (node & cluster) are in RegisterCommonFlags
. My suggestion was to move the specific flag you need from RegisterClusterFlags
to RegisterCommonFlags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, very clear explanation. Updated
e2e_node.test does not set default kubectlPath, which lead to test errors as following: [Fail] [sig-storage] EmptyDir volumes [It] pod should support shared volumes between containers [Conformance] When the test trying to read file in shared volume, it uses "kubeclt exec namespace -c container_name -- cat file_name". However, as variable framework.TestContext.KubectlPath not set, kubectl binary can not be found in the test and the tast fails. This patch move kubectlPath flag from RegisterClusterFlags to RegisterCommonFlags, thus default value for framework.TestContext.KubectlPath will be set,and user can also use --kubectl-path flag to set kubectl path. Signed-off-by: Howard Zhang <howard.zhang@arm.com>
203a5a0
to
1c9da19
Compare
/assign @fejta @tallclair |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fejta, zhlhahaha 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 |
/release-note-none |
/retest Review the full test history for this PR. Silence the bot with an |
What this PR does / why we need it:
e2e_node.test does not set default kubectlPath, which lead to test
errors as following:
[Fail] [sig-storage] EmptyDir volumes [It] pod should support
shared volumes between containers [Conformance]
When the test trying to read file in shared volume, it uses
"kubeclt exec namespace -c container_name -- cat file_name".
However, as variable framework.TestContext.KubectlPath not set,
kubectl binary can not be found in the test and the tast fails.
This patch set default value for framework.TestContext.KubectlPath,
which is same to e2e.test. User can also use --kubectl-path flag to
set kubectl path.
Which issue(s) this PR fixes:
Fixes #82418
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?:
None
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
None