-
Notifications
You must be signed in to change notification settings - Fork 602
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
Change "Not forwarding" messages to debug level #2596
Conversation
Info level should be used only for important events or changes to the system, for example when we forward a port from the guest. Not forwarding a port can be helpful when debugging port forwarding, so keeping it as debug message. Part-of: lima-vm#2577 Signed-off-by: Nir Soffer <nsoffer@redhat.com>
I tried to run hack/test-port-forwarding.pl but is seems to be broken now:
Or maybe the required perl version is not documented? |
I'd say "Not forwarding" message is important and should be printed by default. Probably |
For the use case of disabling all port forwarding, the "not forwarding" message is not important. Maybe we need a simple switch for port forwarding? portForwards:
enabled: false In this case the user made it clear that no forwarding should happen so there is no need to log anything. If you enabled some port forwarding, it makes sense to show what was not forwarded in case you want to know if your rules are correct, although this is mainly for debugging. |
👍 for having a simple switch to disable port forwarding. |
I agree. I've implemented it in #2600.
It already exists: portForwards:
- ignore: true It relies on the fact that the default for You can also set it from the commandline:
|
Note that you cannot disable (or override) redirection of the SSH port (22) because without it Lima doesn't work. |
@jandubois thanks, but I think when I tried this: portForwards:
- guestPortRange: [1, 65535]
ignore: true it did not work, and some ports were forwarded from [::]. I had to use: portForwards:
- guestPortRange: [1, 65535]
guestIP: "0.0.0.0"
ignore: true But assuming we fix the issue, can we detect this as "I don't want any port forwarding" and log the "not forwarding ..." message in debug level? I think this is not good user or developer experience when you don't have a simple way to disable a feature, and you need to depend on a special configuration. |
#2600 seems a better way. |
It is not really something you can run by itself; it is used implicitly by You have to run it twice: once with a template filename to specify the template it should modify with the Since you may also need to install the right version of |
I ran it based on the documentation in the file (adding debug log level):
Maybe the comment should mention the additional requirements, or just remove the comment and add a comment about the script that run it? |
I'm confused, you wrote
You should not get these warnings/failures if you specify arguments to the script.
And, did it work, or show any errors? |
If failed with the error I shared, but it looks like I run the last command without the argument. |
Info level should be used only for important events or changes to the system, for example when we forward a port from the guest. Not forwarding a port can be helpful when debugging port forwarding, so keeping it as debug message.
Part-of: #2577