-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 stat virt-vnc and virt-serial0 return error #8667
Conversation
…r as the base image the default base image for virt-handler is centos, which workdir is /. but we use a custom debian:buster as the base image, which workdir is /root. when we run `virtctl -n test vnc vm1`, it reports an error: Can't access VMI vm1: Internal error occurred: dialing virt-handler: websocket: bad handshake I digged into this problem, and found that the virt-vnc sock path in `getUnixSocketPath` is `proc/3484989/root/var/run/kubevirt-private/a44829ef-d44c-4a64-bf8a-2bcf274bad12/virt-vnc` without leading '/'. when it runs `os.Stat` with this path, it will return an error "no such file or directory". so, I think maybe we can add a leading '/' to make an absolute path, it will work no matter what the workdir of the virt-handler image is. Signed-off-by: huyinhou <[email protected]>
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 Once the patch is verified, the new status will be reflected by the 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/test all
[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 |
/retest |
@huyinhou: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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. |
/lgtm |
/test pull-kubevirt-fossa |
the default base image for virt-handler is centos, which workdir is /. but we use a custom debian:buster as the base image, which workdir is /root.
when we run
virtctl -n test vnc vm1
, it reports an error:Can't access VMI vm1: Internal error occurred: dialing virt-handler: websocket: bad handshake
I digged into this problem, and found that the virt-vnc sock path in
getUnixSocketPath
isproc/3484989/root/var/run/kubevirt-private/a44829ef-d44c-4a64-bf8a-2bcf274bad12/virt-vnc
without leading '/'.when it runs
os.Stat
with this path, it will return an error "no such file or directory".so, I think maybe we can add a leading '/' to make an absolute path, it will work no matter what the workdir of the virt-handler image is.
Signed-off-by: huyinhou [email protected]
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: