Although the error today still does not explicitly tell a user that they should provide a port with a get-url, it has been formatted to be much more readable: ``` $ oc set probe ... --get-url="http://myurlwithnoport.com" error: DeploymentConfig "database" is invalid * spec.template.spec.containers[0].livenessProbe.httpGet.port: Invalid value: "": must contain only alpha-numeric characters (a-z, 0-9), and hyphens (-) * spec.template.spec.containers[0].livenessProbe.httpGet.port: Invalid value: "": must contain at least one letter or number (a-z, 0-9) ``` Perhaps the client could add a message at the bottom of the error message that explicitly tells the user to include a port with their url if one is not found?
Related PR: https://github.com/openshift/origin/pull/12759
Fixed in https://github.com/openshift/origin/pull/12759.
This has been merged into ocp and is in OCP v3.5.0.32 or newer.
I'm not sure I understand Comment 6, the output seems to reflect the changes introduced in PR https://github.com/openshift/origin/pull/12759. The original errors from the server are still present (this was intentional), however a more user-friendly message is also part of the overall output: "A port must be specified as part of a url.."
The last Two lines are cool enough. The first line (as below) is confused, it looks like the dc name is invalid but actually the url in invalid. "error: DeploymentConfig "mydc" is invalid" Also from my understanding the part below the "error" line is in detail, it's better to move the message "A port must be specified as part of a url (http://127.0.0.1:3306)." to the top instead of the line "error: DeploymentConfig "mydc" is invalid". It's not a big fault and you can keep it the same way, but the top part need to update. How do you think?
Hmm it makes sense, I agree. Tested on oc v3.7.0-0.184.0 Still this line "A port must be specified as part of a url (http://127.0.0.1:3306)." is in the last. Will verify on latest version.
Origin PR: https://github.com/openshift/origin/pull/17107
Checked in latest version v3.7.8, it does not include the PR per https://url.corp.redhat.com/3a0e336 (Red Hat internal) Saw Target Release is 3.8.0, will the PR go to v3.7? If no, can you move bug to MODIFIED? Then it will be tested when v3.8 is available
Move to ON_QA for re-test.
Thanks. It prompts clear message about port: $ v3.9.30/oc set probe dc/hello-openshift --liveness --get-url=www.baidu.com A port must be specified as part of a url (http://127.0.0.1:3306). See 'oc set probe -h' for help and examples. error: DeploymentConfig "hello-openshift" is invalid * spec.template.spec.containers[0].livenessProbe.httpGet.port: Invalid value: "": must contain only alpha-numeric characters (a-z, 0-9), and hyphens (-) * spec.template.spec.containers[0].livenessProbe.httpGet.port: Invalid value: "": must contain at least one letter or number (a-z, 0-9)