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

Add groups check to SSH driver #15513

Merged
merged 2 commits into from
Dec 21, 2022
Merged

Add groups check to SSH driver #15513

merged 2 commits into from
Dec 21, 2022

Conversation

kaylendog
Copy link
Contributor

@kaylendog kaylendog commented Dec 14, 2022

Adds a groups check to avoid adding SSH users to the docker group if they're already in the docker group.

fixes #15512

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 14, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot
Copy link
Contributor

Welcome @kaylendog!

It looks like this is your first PR to kubernetes/minikube 🎉. 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/minikube 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 Dec 14, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @kaylendog. 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 /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 cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 14, 2022
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Dec 14, 2022
Copy link
Collaborator

@afbjorklund afbjorklund left a comment

Choose a reason for hiding this comment

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

Sounds good to me, but it could still require (passwordless) sudo for other operations

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund, kaylendog

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 Dec 14, 2022
@kaylendog
Copy link
Contributor Author

Sounds good to me, but it could still require (passwordless) sudo for other operations

Yes, I'm intending this to be more of a quick patch to enable minikube to get pass the usermod command. There's definitely some more stuff to do here!

@afbjorklund
Copy link
Collaborator

afbjorklund commented Dec 14, 2022

Sounds reasonable to avoid the redundant commands, I think it was a "quick fix" for bugs in the provisioner:

1663a03 <-- a0d2c1a <-- 7c5ba62

For legacy reasons it assumed that docker is in the "docker" root group, but that podman is run by using sudo
(there is no reason why it couldn't run docker with sudo, or have podman use the "podman" root group)

Once the rootless drivers entered the scene, it was supposed to be done in a more orderly fashion

But since this is the bare metal (well, virtual machine) drivers - that applies to the cluster container runtime.
And that one by default run as root, it will probably be "a while" before all of Kubernetes can run as rootless.

@medyagh
Copy link
Member

medyagh commented Dec 20, 2022

/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 Dec 20, 2022
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 15513) |
+----------------+----------+---------------------+
| minikube start | 53.2s    | 53.8s               |
| enable ingress | 28.7s    | 27.2s               |
+----------------+----------+---------------------+

Times for minikube start: 52.4s 53.6s 53.5s 53.3s 53.1s
Times for minikube (PR 15513) start: 53.0s 55.1s 53.6s 53.4s 54.0s

Times for minikube ingress: 27.6s 28.6s 28.7s 29.7s 28.7s
Times for minikube (PR 15513) ingress: 25.2s 24.2s 28.1s 29.7s 28.7s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 15513) |
+----------------+----------+---------------------+
| minikube start | 26.5s    | 26.0s               |
| enable ingress | 39.0s    | 20.2s               |
+----------------+----------+---------------------+

Times for minikube start: 27.6s 25.1s 25.1s 25.5s 29.2s
Times for minikube (PR 15513) start: 25.5s 24.6s 26.0s 26.2s 27.9s

Times for minikube ingress: 20.9s 81.0s 49.0s 22.4s 21.4s
Times for minikube (PR 15513) ingress: 21.5s 20.9s 19.0s 19.4s 20.0s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 15513) |
+----------------+----------+---------------------+
| minikube start | 22.9s    | 24.0s               |
| enable ingress | 26.6s    | 26.3s               |
+----------------+----------+---------------------+

Times for minikube ingress: 26.4s 26.5s 26.5s 27.4s 25.9s
Times for minikube (PR 15513) ingress: 26.4s 26.4s 26.4s 26.4s 26.0s

Times for minikube start: 22.2s 25.2s 22.4s 22.5s 22.1s
Times for minikube (PR 15513) start: 32.9s 21.8s 22.0s 21.1s 22.4s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Docker_Windows TestFunctional/parallel/ConfigCmd (gopogh) 0.00 (chart)
KVM_Linux_containerd TestPause/serial/SecondStartNoReconfiguration (gopogh) 4.94 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/kindnet/DNS (gopogh) 7.48 (chart)
Docker_Linux_containerd TestStartStop/group/no-preload/serial/FirstStart (gopogh) 15.04 (chart)
Docker_Linux_containerd TestStartStop/group/no-preload/serial/UserAppExistsAfterStop (gopogh) 15.04 (chart)
Docker_Windows TestPause/serial/PauseAgain (gopogh) 15.79 (chart)
Docker_Linux_containerd TestStartStop/group/no-preload/serial/DeployApp (gopogh) 16.52 (chart)
Docker_macOS TestPause/serial/SecondStartNoReconfiguration (gopogh) 16.79 (chart)
Docker_Linux_containerd TestStartStop/group/no-preload/serial/SecondStart (gopogh) 18.64 (chart)
Docker_Windows TestNetworkPlugins/group/false/DNS (gopogh) 31.25 (chart)
Hyper-V_Windows TestErrorSpam/setup (gopogh) 34.33 (chart)
Hyper-V_Windows TestMultiNode/serial/DeployApp2Nodes (gopogh) 34.33 (chart)
Docker_Windows TestNetworkPlugins/group/kubenet/DNS (gopogh) 43.75 (chart)
Docker_Windows TestStartStop/group/newest-cni/serial/Pause (gopogh) 46.88 (chart)
Hyper-V_Windows TestNoKubernetes/serial/StartWithK8s (gopogh) 50.75 (chart)
Hyper-V_Windows TestPause/serial/SecondStartNoReconfiguration (gopogh) 50.75 (chart)
Docker_Linux_containerd TestStartStop/group/embed-certs/serial/FirstStart (gopogh) 52.21 (chart)
Docker_Linux_containerd TestStartStop/group/embed-certs/serial/UserAppExistsAfterStop (gopogh) 52.21 (chart)
Docker_Linux_containerd TestStartStop/group/embed-certs/serial/DeployApp (gopogh) 52.63 (chart)
Docker_Linux_containerd TestStartStop/group/embed-certs/serial/SecondStart (gopogh) 54.62 (chart)
Docker_Windows TestNetworkPlugins/group/bridge/DNS (gopogh) 58.06 (chart)
Docker_Linux_containerd TestStartStop/group/default-k8s-diff-port/serial/SecondStart (gopogh) 59.29 (chart)
Docker_Linux_containerd TestStartStop/group/default-k8s-diff-port/serial/UserAppExistsAfterStop (gopogh) 59.29 (chart)
Docker_Linux_containerd TestStartStop/group/default-k8s-diff-port/serial/FirstStart (gopogh) 60.34 (chart)
Docker_Linux_containerd TestStartStop/group/default-k8s-diff-port/serial/DeployApp (gopogh) 60.68 (chart)
Docker_macOS TestMultiNode/serial/RestartKeepsNodes (gopogh) 61.15 (chart)
Docker_Linux TestNetworkPlugins/group/calico/Start (gopogh) 70.50 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 75.21 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/bridge/DNS (gopogh) 78.69 (chart)
KVM_Linux TestMultiNode/serial/ValidateNameConflict (gopogh) 92.59 (chart)
More tests... Continued...

Too many tests failed - See test logs for more details.

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

@medyagh medyagh merged commit f80c39c into kubernetes:master Dec 21, 2022
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sudo usermod fails due to lack of interactive terminal
6 participants