Skip to content

suggest using default cluster port on internal server error #12654

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

juanvallejo
Copy link
Contributor

@juanvallejo juanvallejo commented Jan 24, 2017

Related Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1406066

This patch suggests using the default cluster port with the current host
used by a client, if the current port does not match the default port,
and the client receives an internal / unknown error from the server.

Example

$ oc login --server=https://10.13.137.149:8444 -u system:admin
The server uses a certificate signed by an unknown authority.
You can bypass the certificate check, but any data you send to the server could be intercepted by others.
Use insecure connections? (y/n): y

error: Internal error occurred: unexpected response: 503
You may want to try using the default cluster port: https://10.13.137.149:8443

cc @openshift/cli-review

@juanvallejo
Copy link
Contributor Author

[test]

@smarterclayton
Copy link
Contributor

When does this happen?

@smarterclayton
Copy link
Contributor

it's unlikely 503 means "use another port" in most setups. It's more likely to mean "all servers are down".

I would replace both lines with a message like "error: The server was unable to respond - verify you have provided the correct host and port and that the server is currently running."

@juanvallejo
Copy link
Contributor Author

@smarterclayton

When does this happen?

It happens when a client attempts to connect to a non-default (non-8443) open port and receives an error, as well as when a client attempts to connect to a non-default closed port. We were already suggesting that users try using the default cluster port if the client attempted to connect to a closed port.

I would replace both lines with a message like "error: The server was unable to respond - verify you have provided the correct host and port and that the server is currently running."

Thanks, I have updated the error message to this one whenever a client attempts to connect to any open port and receives an error. Should this be the case as well for closed ports?

@juanvallejo juanvallejo force-pushed the jvallejo/suggest-using-default-port-on-internal-err branch 2 times, most recently from 1d04bf6 to 1b62f71 Compare January 24, 2017 22:46
@smarterclayton
Copy link
Contributor

smarterclayton commented Jan 24, 2017 via email

@juanvallejo juanvallejo force-pushed the jvallejo/suggest-using-default-port-on-internal-err branch from 1b62f71 to 07abdfb Compare January 25, 2017 15:37
@juanvallejo
Copy link
Contributor Author

@smarterclayton

I don't think we should suggest the default cluster port. No OpenShift
installation I'm aware of except oc cluster up would use that port.

Okay, updated the last commit to return error: The server was unable to respond - verify you have provided the correct host and port and that the server is currently running. both when a client tries to log in to a closed port, and when it tries to log in to an open port but receives an internal / unknown error.

@juanvallejo juanvallejo force-pushed the jvallejo/suggest-using-default-port-on-internal-err branch 2 times, most recently from a51bbd2 to 275a4a3 Compare January 25, 2017 20:49
@juanvallejo
Copy link
Contributor Author

conformance flaked on #11775 re[test]

This patch suggests using the default cluster port with the current host
used by a client, if the current port does not match the default port,
and the client receives an internal / unknown error from the server.
@juanvallejo juanvallejo force-pushed the jvallejo/suggest-using-default-port-on-internal-err branch from 275a4a3 to 91b914e Compare January 26, 2017 18:08
@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 91b914e

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13347/) (Base Commit: 3e38a69)

@juanvallejo
Copy link
Contributor Author

@smarterclayton are there any further comments on this patch? Thanks!

@juanvallejo
Copy link
Contributor Author

cc @fabianofranz

@fabianofranz
Copy link
Member

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 91b914e

@openshift-bot
Copy link
Contributor

openshift-bot commented Mar 9, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/21/) (Base Commit: d3a3181) (Image: devenv-rhel7_6061)

@openshift-bot openshift-bot merged commit 5532c96 into openshift:master Mar 9, 2017
@juanvallejo juanvallejo deleted the jvallejo/suggest-using-default-port-on-internal-err branch March 9, 2017 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants