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

linkerd check on host with no internet access gives missleading messages #11349

Closed
dagri-hub opened this issue Sep 7, 2023 · 5 comments · Fixed by #11377
Closed

linkerd check on host with no internet access gives missleading messages #11349

dagri-hub opened this issue Sep 7, 2023 · 5 comments · Fixed by #11377

Comments

@dagri-hub
Copy link

What is the issue?

linkerd check fails in the following tests because it cannot get the latest version from https://versioncheck.linkerd.io/version.json

  • linkerd-version
  • control-plane-version
  • linkerd-control-plane-proxy

When linkerd check fails the test "linkerd-version" due to no internet access it cannot get the recent version and therefore fails more tests (with a warning), but with irritating messages. The messages indicate that my installation does not have the correct versions - although everything is fine.

linkerd-check-no-internet.txt
linkerd-check-internet.txt

How can it be reproduced?

I used stable-2.14.0, but it also works with earlier versions.

  1. Install linkerd
  2. Disable the internet access from the host where you are going to use the linkerd cli
  3. Login into the cluster
  4. Use the linkerd cli with linkerd check to get the result

You can do the same test and enable the internet access and the output of linkerd check will be correct.

Logs, error output, etc

linkerd-check-no-internet.txt
linkerd-check-internet.txt

output of linkerd check -o short

linkerd-check-short.txt

Environment

Kubernetes Version: Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.8+vmware.3", GitCommit:"53e803785668c31b8fcb41fc3607f3fdc3c87465", GitTreeState:"clean", BuildDate:"2022-11-03T17:16:51Z", GoVersion:"go1.17.11", Compiler:"gc", Platform:"linux/amd64"}
Cluster Environemnt: Tanzu
Host OS: RHEL 8.5
Linkerd Version: stable-2.14.0

Possible solution

It would be great to change the warning messages or to skip the version tests when the latest version is not receivable from the internet or add an option for the cli where I can pass the latest version like

linkerd check -no-versioncheck
or
linkerd check -latest-version=stable-2.14.0

Additional context

https://linkerd.slack.com/archives/C89RTCWJF/p1694093242741459

Would you like to work on fixing this bug?

None

@dagri-hub dagri-hub added the bug label Sep 7, 2023
@dagri-hub dagri-hub changed the title linkerd check on host with no internet access gives misleading messages linkerd check on host with no internet access gives missleading messages Sep 7, 2023
@mateiidavid
Copy link
Member

@dagri-hub thanks for raising this issue! I've marked this as help wanted. From our perspective, it would make sense to change the level of the message to a warn instead of an error / failure. We're happy to accept a PR that implements this.

@dagri-hub
Copy link
Author

Hello @mateiidavid, I just learned in the Linkerd Slack Channel that there is already an option for passing the latest-version or what the option says - the --expected-version. This is basically what I missed.

So you are right, when there is no internet connection a warning like "No internet access. Please use linkerd check --expected-version stable-2.14.0" or something like that would be great.

@mateiidavid
Copy link
Member

Yeah, almost forgot to mention you can use --expected-version, glad you sorted it out though! I'd be happy to offer guidance if you want to contribute the patch yourself, otherwise, this up for grabs for whomever wants to do a bit of work on the CLI :)

@dtaskai
Copy link
Contributor

dtaskai commented Sep 13, 2023

Would love to have a go at it if it is still up for grabs! 😄

@hawkw
Copy link
Member

hawkw commented Sep 13, 2023

@dtaskai As far as I know, nobody's working on this, so feel free to submit a PR! Thanks in advance! :)

olix0r added a commit that referenced this issue Sep 26, 2023
…11377)

When the Linkerd CLI is unable to access the internet, it will encounter
a DNS error when trying to discover the latest Linkerd releases from linkerd.io.

This change handles this DNS resolution error explicitly so that users receive
a more informative error message.

Fixes #11349

Signed-off-by: Dominik Táskai <dominik.taskai@leannet.eu>
Co-authored-by: Dominik Táskai <dominik.taskai@leannet.eu>
Co-authored-by: Oliver Gould <ver@buoyant.io>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants