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

oci.DaemonHost handle empty hostnames #17487

Closed
wants to merge 3 commits into from

Conversation

pnasrat
Copy link
Contributor

@pnasrat pnasrat commented Oct 25, 2023

This handles DOCKER_HOST='tcp://:'

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 25, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @pnasrat. 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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 25, 2023
This handles DOCKER_HOST='tcp://:'
@pnasrat pnasrat force-pushed the oci-driver-hostname-empty branch from 92c7832 to a1093a6 Compare October 25, 2023 18:35
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Oct 25, 2023
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@medyagh
Copy link
Member

medyagh commented Oct 25, 2023

thank you @pnasrat for this PR, do you mind specifying in what use cases this would happen ? is it a speicifc OS or if user have a custom env? is it for a corp setting?

@pnasrat
Copy link
Contributor Author

pnasrat commented Oct 25, 2023

@medyagh sure I encountered this when debugging #17452 - I'm not 100% sure why it was failing for the user though so perhaps I should remove the Fixes above as when I filed the PR I hadn't heard back about their local config.

My analysis is in #17452 (comment) but I'll summarize here

DOCKER_HOST can take multiple forms which can be seen in the upstream Moby hosts_tests https://github.com/moby/moby/blob/1f096174d614276845527790e556a6a3911ae99c/opts/hosts_test.go#L26

The tcp://: DOCKER_HOST listed there that the DaemonHost code will incorrectly return an empty hostname and thus cause the error reported there Exiting due to DRV_CP_ENDPOINT: Unable to get forwarded endpoint: failed to lookup ip for "" my PR handles this by only returning if the hostname is not empty and falling through to the defaults otherwise.

@medyagh
Copy link
Member

medyagh commented Oct 25, 2023

/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 Oct 25, 2023
pkg/drivers/kic/oci/oci.go Outdated Show resolved Hide resolved
@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

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.

thank you very much @pnasrat for this contribution

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 29, 2023
@medyagh medyagh self-requested a review November 29, 2023 19:55
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.

thank you for ur patience on this review, please take another look at the comment

pkg/drivers/kic/oci/oci_test.go Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pnasrat
Once this PR has been reviewed and has the lgtm label, please assign spowelljr for approval. For more information see the Kubernetes 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 removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 29, 2023
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 17487) |
+----------------+----------+---------------------+
| minikube start | 50.4s    | 51.4s               |
| enable ingress | 28.3s    | 28.6s               |
+----------------+----------+---------------------+

Times for minikube start: 50.3s 51.0s 50.7s 50.5s 49.7s
Times for minikube (PR 17487) start: 49.5s 51.9s 51.8s 52.9s 50.8s

Times for minikube ingress: 28.2s 27.3s 28.1s 27.7s 30.2s
Times for minikube (PR 17487) ingress: 27.6s 28.8s 28.8s 29.3s 28.3s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 17487) |
+----------------+----------+---------------------+
| minikube start | 23.2s    | 24.7s               |
| enable ingress | 21.0s    | 21.0s               |
+----------------+----------+---------------------+

Times for minikube ingress: 21.4s 21.9s 20.4s 20.4s 20.9s
Times for minikube (PR 17487) ingress: 20.9s 20.9s 20.9s 20.4s 21.9s

Times for minikube start: 25.5s 22.7s 23.1s 22.5s 22.1s
Times for minikube (PR 17487) start: 23.0s 26.4s 22.9s 26.1s 25.2s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 17487) |
+----------------+----------+---------------------+
| minikube start | 23.5s    | 23.9s               |
| enable ingress | 29.5s    | 34.5s               |
+----------------+----------+---------------------+

Times for minikube start: 24.3s 23.7s 24.5s 21.3s 23.9s
Times for minikube (PR 17487) start: 24.8s 24.2s 21.5s 24.1s 24.9s

Times for minikube ingress: 31.4s 31.4s 33.4s 20.0s 31.4s
Times for minikube (PR 17487) ingress: 47.4s 31.4s 30.9s 31.4s 31.4s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Docker_Linux_crio_arm64 TestFunctional/parallel/MountCmd/specific-port (gopogh) 0.00 (chart)
Hyperkit_macOS TestNoKubernetes/serial/Stop (gopogh) 0.65 (chart)
Docker_Linux TestFunctional/parallel/MountCmd/specific-port (gopogh) 1.17 (chart)
Docker_Linux_docker_arm64 TestScheduledStopUnix (gopogh) 2.33 (chart)
KVM_Linux TestStartStop/group/newest-cni/serial/Pause (gopogh) 2.34 (chart)
KVM_Linux TestStartStop/group/newest-cni/serial/SecondStart (gopogh) 2.34 (chart)
KVM_Linux_crio TestStartStop/group/newest-cni/serial/EnableAddonAfterStop (gopogh) 14.37 (chart)
KVM_Linux_crio TestStartStop/group/newest-cni/serial/Stop (gopogh) 14.37 (chart)
Hyperkit_macOS TestNetworkPlugins/group/auto/Start (gopogh) 45.45 (chart)

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

@pnasrat pnasrat requested a review from medyagh December 1, 2023 14:26
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 29, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 30, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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.

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. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. 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.

7 participants