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 the current user's name to log file hashes to prevent collision. #11294

Merged
merged 1 commit into from
May 6, 2021

Conversation

andriyDev
Copy link
Contributor

@andriyDev andriyDev commented May 5, 2021

Related to #11242. Also discussed in triage.

Previously, log file hashes included the whole command being executed. Now in addition, the current user's name is also mixed in. This will prevent many permission errors due to multiple users opening the same file (from running the same command).

Before:
User 1:

user1 $ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

User 2:

user2 $ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured
user2 $ ls /tmp | grep minikube
minikube_status_fb2feb4a2226806e2b4f9a77bad9875c0572b6ed_0.log

After:
User 1:

user1 $ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

User 2:

user2 $ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured
user2 $ ls /tmp | grep minikube
minikube_status_00ea4c7fceaa4b61415be366d142d0847ccfce39_0.log
minikube_status_5d806d243961aaef0f535b5f4fe45369b3dd90ac_0.log

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 5, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @andriyDev. 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 the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 5, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: andriyDev
To complete the pull request process, please assign medyagh after the PR has been reviewed.
You can assign the PR to them by writing /assign @medyagh in a comment when ready.

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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 5, 2021
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

would u plz add before and after this PR in the description?

@andriyDev
Copy link
Contributor Author

Updated!

@medyagh
Copy link
Member

medyagh commented May 5, 2021

/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 May 5, 2021
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11294) |
+----------------+----------+---------------------+
| minikube start | 49.0s    | 48.3s               |
| enable ingress | 34.8s    | 36.2s               |
+----------------+----------+---------------------+

Times for minikube start: 48.9s 47.5s 48.9s 49.1s 50.6s
Times for minikube (PR 11294) start: 47.1s 47.1s 51.9s 47.3s 47.8s

Times for minikube (PR 11294) ingress: 34.8s 34.7s 34.8s 34.8s 41.8s
Times for minikube ingress: 33.7s 36.3s 34.3s 35.3s 34.3s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11294) |
+----------------+----------+---------------------+
| minikube start | 21.8s    | 21.2s               |
| enable ingress | 29.1s    | 31.3s               |
+----------------+----------+---------------------+

Times for minikube (PR 11294) ingress: 32.0s 29.5s 28.5s 37.0s 29.5s
Times for minikube ingress: 29.0s 29.5s 28.5s 29.5s 29.0s

Times for minikube start: 22.9s 21.1s 21.7s 22.0s 21.5s
Times for minikube (PR 11294) start: 21.5s 20.5s 21.7s 21.4s 21.1s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11294) |
+----------------+----------+---------------------+
| minikube start | 41.7s    | 44.6s               |
| enable ingress |          |                     |
+----------------+----------+---------------------+

Times for minikube start: 31.1s 44.3s 47.1s 43.0s 43.2s
Times for minikube (PR 11294) start: 46.6s 43.0s 42.7s 46.8s 43.7s

@medyagh
Copy link
Member

medyagh commented May 6, 2021

/retest-this-please

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11294) |
+----------------+----------+---------------------+
| minikube start | 50.2s    | 51.8s               |
| enable ingress | 39.3s    | 40.5s               |
+----------------+----------+---------------------+

Times for minikube start: 49.8s 47.1s 51.1s 49.9s 53.2s
Times for minikube (PR 11294) start: 55.2s 47.0s 52.5s 53.8s 50.7s

Times for minikube ingress: 42.2s 35.8s 44.0s 36.8s 37.7s
Times for minikube (PR 11294) ingress: 43.2s 37.7s 35.3s 43.2s 43.2s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11294) |
+----------------+----------+---------------------+
| minikube start | 22.0s    | 21.5s               |
| enable ingress | 34.6s    | 35.1s               |
+----------------+----------+---------------------+

Times for minikube start: 23.4s 21.6s 21.6s 21.8s 21.6s
Times for minikube (PR 11294) start: 21.9s 21.1s 21.8s 21.3s 21.3s

Times for minikube ingress: 32.0s 35.0s 33.0s 38.0s 35.0s
Times for minikube (PR 11294) ingress: 32.5s 38.0s 32.5s 34.1s 38.5s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11294) |
+----------------+----------+---------------------+
| minikube start | 41.7s    | 45.0s               |
| enable ingress |          |                     |
+----------------+----------+---------------------+

Times for minikube start: 31.0s 47.8s 43.1s 43.7s 43.0s
Times for minikube (PR 11294) start: 43.1s 43.0s 47.5s 44.6s 47.1s

@k8s-ci-robot
Copy link
Contributor

@andriyDev: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-minikube-build 65c0f0f link /test pull-minikube-build

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

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. 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.

5 participants