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

Use sudo -n if --interactive=false #19531

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

spowelljr
Copy link
Member

Fixes #19518

Uses sudo -n if --interactive=false

Also changed the wording from Your firewall is blocking bootpd which is required for socket_vmnet. to Your firewall is blocking bootpd which is required for this configuration. since vfkit also uses this logic.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 28, 2024
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 28, 2024
@@ -75,6 +76,7 @@ func UnblockBootpd() error {
klog.Infof("%v may require a password: %v", c.Args, err)
if !viper.GetBool("interactive") {
klog.Warningf("%s requires a password, and --interactive=false", c.Args)
c.Args = slices.Insert(c.Args, 1, "-n")
Copy link
Member

Choose a reason for hiding this comment

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

thanks for limitting it only for "interactive" to avoid Unintended Privilege Escalation like if the user has recently used sudo for a different purpose. This could pose a security risk if the script is compromised or contains errors.
but it makes sense for not interactive

@medyagh
Copy link
Member

medyagh commented Aug 29, 2024

/ok-to-test

@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 Aug 29, 2024
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19531) |
+----------------+----------+---------------------+
| minikube start | 49.7s    | 50.8s               |
| enable ingress | 15.4s    | 15.7s               |
+----------------+----------+---------------------+

Times for minikube start: 51.4s 51.0s 48.7s 50.2s 47.3s
Times for minikube (PR 19531) start: 52.1s 53.6s 50.1s 48.7s 49.3s

Times for minikube ingress: 16.0s 16.1s 15.0s 15.1s 15.0s
Times for minikube (PR 19531) ingress: 15.1s 16.5s 15.5s 15.5s 15.6s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19531) |
+----------------+----------+---------------------+
| minikube start | 21.8s    | 22.1s               |
| enable ingress | 12.5s    | 13.1s               |
+----------------+----------+---------------------+

Times for minikube start: 21.0s 23.8s 21.4s 21.3s 21.6s
Times for minikube (PR 19531) start: 24.1s 21.0s 24.0s 21.0s 20.6s

Times for minikube ingress: 13.8s 13.3s 12.3s 10.9s 12.3s
Times for minikube (PR 19531) ingress: 12.3s 13.3s 13.3s 12.8s 13.8s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19531) |
+----------------+----------+---------------------+
| minikube start | 21.8s    | 21.6s               |
| enable ingress | 37.7s    | 37.7s               |
+----------------+----------+---------------------+

Times for minikube start: 23.7s 23.1s 20.1s 19.7s 22.5s
Times for minikube (PR 19531) start: 22.7s 19.7s 23.6s 22.4s 19.5s

Times for minikube ingress: 38.8s 38.8s 38.8s 33.3s 38.8s
Times for minikube (PR 19531) ingress: 38.8s 39.3s 32.3s 39.3s 38.8s

@minikube-pr-bot
Copy link

Here are the number of top 10 failed tests in each environments with lowest flake rate.

Environment Test Name Flake Rate
Docker_Linux (1 failed) TestAddons/parallel/Registry(gopogh) 6.67% (chart)
Docker_Linux_docker_arm64 (1 failed) TestAddons/parallel/Registry(gopogh) 6.67% (chart)
none_Linux (1 failed) TestAddons/parallel/Registry(gopogh) 6.41% (chart)
Docker_Linux_crio (4 failed) TestAddons/parallel/Registry(gopogh) 6.71% (chart)
Docker_Linux_crio (4 failed) TestFunctional/parallel/ImageCommands/ImageLoadFromFile(gopogh) 6.71% (chart)
Docker_Linux_crio_arm64 (3 failed) TestAddons/parallel/Registry(gopogh) 6.67% (chart)
KVM_Linux (1 failed) TestAddons/parallel/Registry(gopogh) 6.21% (chart)
KVM_Linux_containerd (2 failed) TestAddons/StoppedEnableDisable(gopogh) 0.61% (chart)
KVM_Linux_containerd (2 failed) TestAddons/parallel/InspektorGadget(gopogh) 1.21% (chart)
Docker_Cloud_Shell (6 failed) TestAddons/parallel/Registry(gopogh) 1.37% (chart)

Besides the following environments also have failed tests:

To see the flake rates of all tests by environment, click here.

@medyagh
Copy link
Member

medyagh commented Aug 30, 2024

/lgtm

@medyagh medyagh merged commit 64eab73 into kubernetes:master Aug 30, 2024
32 of 49 checks passed
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 30, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, spowelljr

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

@spowelljr spowelljr deleted the fixSudoOnNonInteractiv branch October 21, 2024 17:20
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. 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. 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.

--interactive=false is ignored
4 participants