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

Fix remoteAddress field being truncated when it is an ipv6 address #8660

Merged
merged 2 commits into from
Dec 21, 2022

Conversation

huyinhou
Copy link
Contributor

@huyinhou huyinhou commented Oct 25, 2022

when deploy the kubevirt in an ipv6-only cluster, the remoteAddress field in virt-api rest log is truncated, which looks like {"component":"virt-api","contentLength":2677,..."remoteAddress":"[fd00",
so we use the net.SplitHostPort to split the host and port, then log the real host in remoteAddress field.

Signed-off-by: huyinhou huyinhou@bytedance.com

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Release note:

Fix remoteAddress field in virt-api log being truncated when it is an ipv6 address

when deploy the kubevirt in an ipv6-only cluster, the remoteAddress
field in virt-api rest log is truncated, which looks like
`{"component":"virt-api","contentLength":2677,..."remoteAddress":"[fd00",`
so we use the `net.SplitHostPort` to split the host and port, then
log the real host in remoteAddress field.

Signed-off-by: huyinhou <huyinhou@bytedance.com>
@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/XS labels Oct 25, 2022
@kubevirt-bot
Copy link
Contributor

Hi @huyinhou. Thanks for your PR.

I'm waiting for a kubevirt 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.

@kubevirt-bot kubevirt-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 25, 2022
@lyarwood
Copy link
Member

/ok-to-test

@kubevirt-bot kubevirt-bot 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, 2022
@huyinhou
Copy link
Contributor Author

/retest-required

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 26, 2022
pkg/rest/filter/filter.go Show resolved Hide resolved
Signed-off-by: huyinhou <huyinhou@bytedance.com>
@huyinhou huyinhou requested review from lyarwood and removed request for stu-gott November 15, 2022 15:00
@huyinhou
Copy link
Contributor Author

/retest-required

@maya-r
Copy link
Contributor

maya-r commented Dec 9, 2022

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 9, 2022
Copy link
Member

@xpivarc xpivarc left a comment

Choose a reason for hiding this comment

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

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xpivarc

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 19, 2022
@brianmcarey
Copy link
Member

/retest-required

@kubevirt-bot
Copy link
Contributor

kubevirt-bot commented Dec 20, 2022

@huyinhou: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubevirt-e2e-kind-1.23-vgpu-nonroot d762ebe link true /test pull-kubevirt-e2e-kind-1.23-vgpu-nonroot
pull-kubevirt-e2e-k8s-1.23-sig-compute-migrations d762ebe link true /test pull-kubevirt-e2e-k8s-1.23-sig-compute-migrations

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.

@kubevirt-commenter-bot
Copy link

/retest-required
This bot automatically retries required jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-bot kubevirt-bot merged commit 7ffeba6 into kubevirt:main 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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants