-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Update gvproxy to v0.8.0 and disable ssh port forwarding on wsl #24394
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
Conversation
is it possible to add a test to this PR? |
/approve |
lgtm |
Are there some 'high level' tests which start podman-machine/gvproxy on Windows/wsl? We could add a test there to check that on the host, nothing listens on port 2222 |
These are some machine e2e SSH tests here. The README.md file has instructions to run them (on windows too). |
/packit retest-failed |
yes ofc there are! |
4218495
to
213de16
Compare
Thanks for the reviews! I have added a small modification to the windows init test to ensure port 2222 is open |
3645d55
to
c9014e8
Compare
This PR has been marked for 5.3 inclusion but it must be merged prior to 11/5 for inclusion in 5.3 RC3. PRs not merged by that date are considered on a case by case basis for backporting. |
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.
A few comments, but looks good to me
@@ -32,7 +32,7 @@ fi | |||
if [[ ! $ROUTE =~ default\ via ]]; then | |||
exit 3 | |||
fi | |||
nohup $GVFORWARDER -iface podman-usermode -stop-if-exist ignore -url "stdio:$GVPROXY?listen-stdio=accept" > /var/log/vm.log 2> /var/log/vm.err < /dev/null & | |||
nohup $GVFORWARDER -iface podman-usermode -stop-if-exist ignore -url "stdio:$GVPROXY?listen-stdio=accept&ssh-port=-1" > /var/log/vm.log 2> /var/log/vm.err < /dev/null & |
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.
You could add in the commit log that this port forwarding is not needed in the wsl case
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.
Updated the message to:
gvproxy: Disable port-forwarding on WSL
This commit disables ssh port forwarding on WSL by passing -1 to the -ssh-port flag of gvproxy. Port forwarding is not required on WSL and disabling it prevents port conflict with CRC.
Fixes: https://github.com/containers/podman/issues/20327
@@ -279,7 +279,7 @@ switch ($target) { | |||
if ($args.Count -gt 1) { | |||
$ref = $args[1] | |||
} | |||
Win-SSHProxy -Ref $ref | |||
Win-SSHProxy($ref) |
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.
Not sure what this change does, was this broken before?
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.
yes, the -Ref
flag wasn't returning the expected result.
CI reports:
|
c9014e8
to
cdeb415
Compare
Signed-off-by: Gunjan Vyas <vyasgun20@gmail.com>
7bcc2cf
to
2dd5851
Compare
This commit disables ssh port forwarding on WSL by passing -1 to the -ssh-port flag of gvproxy. Port forwarding is not required on WSL and disabling it prevents port conflict with CRC. Fixes: containers#20327 Signed-off-by: Gunjan Vyas <vyasgun20@gmail.com>
2dd5851
to
bda7eb7
Compare
/lgtm |
@cfergeau: changing LGTM is restricted to collaborators 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-sigs/prow repository. |
There is a |
c96d80b
to
0b53f7e
Compare
@cfergeau it was due to the missing end of line in |
test/python/requirements.txt
Outdated
../apiv2/python/requirements.txt |
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.
This is not correct at all! I don't know why you changed this, none of your chnages have to do anything with the api/python tests so this cannot be related to that at all.
And this is not a regular file, it is a symlink and adding \n
just breaks the link as it now points to something non existing.
$ ls -l test/python/requirements.txt
lrwxrwxrwx. 1 pholzing pholzing 33 Nov 6 13:52 test/python/requirements.txt -> '../apiv2/python/requirements.txt'$'\n'
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.
I didn't change this - the winmake.ps1 script did when I ran winmake.ps1 lint
(which fails on CI otherwise)
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.
winmake.ps1 lint (which fails on CI otherwise)
This scripts is never run in CI AFAICT so I don't see how CI can fail there. Do you have a link of the failure?
If the script is editing totally unrelated things that winmake.ps1 is broken and you should report this as bug. I don't use windows so I cannot test that.
But the fact is this is not a normal file but a symlink and changing the content to add a newline simply breaks the link as it point to a non existing file with a \n
ending.
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.
I ran the winmake.ps1 lint
on my local machine and it modified the file:
PS C:\Users\gvyas\GolandProjects\podman> git status
On branch pr/gvproxy080
Your branch is up to date with 'origin/pr/gvproxy080'.
nothing to commit, working tree clean
PS C:\Users\gvyas\GolandProjects\podman> .\winmake.ps1 lint
golangci-lint run --timeout=10m --build-tags="remote exclude_graphdriver_btrfs btrfs_noversion exclude_graphdriver_devicemapper containers_image_openpgp" C:\Users\gvyas\GolandProjects\podman\cmd\podman
pre-commit run --all-files
Fix End of Files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook
Fixing test/python/requirements.txt
Trim Trailing Whitespace.................................................Passed
Mixed line ending........................................................Passed
check BOM - deprecated: use fix-byte-order-marker........................Passed
Check that executables have shebangs.....................................Passed
Check for merge conflicts................................................Passed
Check Yaml...............................................................Passed
codespell................................................................Passed
Exit code = '1' running 'pre-commit run --all-files' at C:\Users\gvyas\GolandProjects\podman\winmake.ps1:188
At C:\Users\gvyas\GolandProjects\podman\contrib\cirrus\win-lib.ps1:80 char:9
+ throw "Exit code = '$exitCode' running $command at $($caller. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Exit code = '1'...winmake.ps1:188:String) [], RuntimeException
+ FullyQualifiedErrorId : Exit code = '1' running 'pre-commit run --all-files' at C:\Users\gvyas\GolandProjects\podman\winmake.ps1:18
8
PS C:\Users\gvyas\GolandProjects\podman> git status
On branch pr/gvproxy080
Your branch is up to date with 'origin/pr/gvproxy080'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: test/python/requirements.txt
no changes added to commit (use "git add" and/or "git commit -a")
PS C:\Users\gvyas\GolandProjects\podman> git diff
diff --git a/test/python/requirements.txt b/test/python/requirements.txt
index 455f09f7d..d5ac3f29d 120000
--- a/test/python/requirements.txt
+++ b/test/python/requirements.txt
@@ -1 +1 @@
-../apiv2/python/requirements.txt
\ No newline at end of file
+../apiv2/python/requirements.txt
PS C:\Users\gvyas\GolandProjects\podman>
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.
I reverted this change.
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.
@l0rd Can you have a look at what this script does? I guess the problem is that git + windows do not create an actual symlink so the pre-commit considers this a normal file?
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.
@Luap99 Yes, symlinks in Git repositories are problematic on Windows (see this so thread and this pre-commit hook). We are ignoring the ones that are in contrib/systemd/user
, we may want to ignore this one too and I have a PR for that.
Apart from that, .\winmake.ps1 lint
works fine and is useful for Windows contributors. The fact that's not used in CI is problematic as it get broken with nobody noticing it. The same thing applies to most of the winmake.ps1
targets as in CI we cross-compile rather than compiling on Windows. If we want to maintain these scripts we'd better use them in CI.
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.
@Luap99 A symbolic link created using ln
on Linux is not going to be interpreted the same way on Windows after the repo being cloned - on Windows, it will just contain the path to the actual file which is the reason why the pre-commit
linter is adding an end of line to it. I fixed it on Windows by running git config --global core.symlinks true
I just have one question - Why is podman using symbolic link instead of using -r
prefix to refer to the other requirements.txt
file?
0b53f7e
to
cd3f7c7
Compare
Add missing end of line in test/python/requirements.txt Signed-off-by: Gunjan Vyas <vyasgun20@gmail.com>
Signed-off-by: Gunjan Vyas <vyasgun20@gmail.com>
cd3f7c7
to
4e8d2dd
Compare
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: baude, Luap99, vyasgun 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 |
This fixes #20327.
This change will pass
-1
to the-ssh-port
flag ofgvproxy
to disable port forwarding on wsl which will prevent port conflict with crc.Does this PR introduce a user-facing change?
No