Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1332871 - Confusing error message for oc set probe
Confusing error message for oc set probe
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.2.0
Unspecified Unspecified
medium Severity low
: ---
: 3.8.0
Assigned To: Juan Vallejo
Xingxing Xia
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-04 05:10 EDT by Michal Fojtik
Modified: 2018-09-11 14:17 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-09-11 14:17:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 Juan Vallejo 2017-02-01 13:59:55 EST
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?
Comment 2 Juan Vallejo 2017-02-01 14:09:34 EST
Related PR: https://github.com/openshift/origin/pull/12759
Comment 3 Fabiano Franz 2017-02-18 19:01:57 EST
Fixed in https://github.com/openshift/origin/pull/12759.
Comment 4 Troy Dawson 2017-02-21 17:36:34 EST
This has been merged into ocp and is in OCP v3.5.0.32 or newer.
Comment 7 Juan Vallejo 2017-02-23 13:42:52 EST
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.."
Comment 8 XiaochuanWang 2017-02-24 04:42:50 EST
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?
Comment 11 XiaochuanWang 2017-10-31 03:48:44 EDT
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.
Comment 12 Juan Vallejo 2017-10-31 13:01:44 EDT
Origin PR: https://github.com/openshift/origin/pull/17107
Comment 13 Xingxing Xia 2017-11-15 03:56:02 EST
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
Comment 16 Liang Xia 2018-06-25 05:05:43 EDT
Move to ON_QA for re-test.
Comment 17 Xingxing Xia 2018-06-25 22:49:55 EDT
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)

Note You need to log in before you can comment on or make changes to this bug.