Bug 1432070
Summary: | "" As a hawkular endpoint port passes validation, but prevents provider edit. | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Jaroslav Henner <jhenner> | ||||
Component: | Providers | Assignee: | Beni Paskin-Cherniavsky <cben> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Jaroslav Henner <jhenner> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 5.8.0 | CC: | cben, epacific, fsimonce, jfrey, jhardy, mtayer, obarenbo, simaishi | ||||
Target Milestone: | GA | Keywords: | TestOnly, ZStream | ||||
Target Release: | 5.9.0 | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | container:ui | ||||||
Fixed In Version: | 5.9.0.5 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 1462844 (view as bug list) | Environment: | |||||
Last Closed: | 2018-03-06 14:55:40 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | Container Management | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 1437138 | ||||||
Bug Blocks: | 1462844 | ||||||
Attachments: |
|
Description
Jaroslav Henner
2017-03-14 12:57:44 UTC
Federico, it sounds like this is in the Containers provider section, but I'm not altogether positive. Please reassign to Alissa or Heiko if it's really just a Hawkular issue. Beni IIUC this is indeed on OpenShift Hawkular endpoint. Please make sure that's really the case. Beni could this be a duplicate of bug 1437138? Reproduced. There are several problems here: (1) For new provider, without filling Hawkular Hostname, it's possible to edit Hawkular Port, including making it empty, and the Hawkular tab is still valid, you can press [Add]. It only prevents [Add] if hostname is non-empty. This is part of the weird way we make hawkular "optional"... (2) When you do that, if route probing worked, you get hawkular endpoint with hostname ("hawkular-metrics.10.35.48.131.xip.io") but with port == nil. hawkular-metrics route also has port info e.g.: :port=>{:targetPort=>"https-endpoint"} I think we should be able to detect both. (3) When you want to edit, JS crashes, Edit form doesn't show at all! "TypeError: Cannot read property 'toString' of null" in getEmsFormIdDataComplete, the function building Edit form. Attaching screenshot. (Jaroslav essentially said all this, I just didn't read carefully until I reproduced.) I suppose your fix for bug 1437138 will also fix these, not sure if dup, for now marking dependant. Should I independently fix JS to not crash? Created attachment 1273926 [details]
Screenshot: attempted Edit of provider with hawkular port == nil
New commit detected on ManageIQ/manageiq-ui-classic/fine: https://github.com/ManageIQ/manageiq-ui-classic/commit/a1be655a33ed0f5b784e7fffc41431908cc87e34 commit a1be655a33ed0f5b784e7fffc41431908cc87e34 Author: Beni Cherniavsky-Paskin <cben> AuthorDate: Mon Jun 19 18:11:47 2017 +0300 Commit: Beni Cherniavsky-Paskin <cben> CommitDate: Mon Jun 19 18:11:47 2017 +0300 Backport of https://github.com/ManageIQ/manageiq-ui-classic/pull/1305 It is possible to add such provider on fine (fixed in #1172, fine/no). This makes Edit not crash but display port 443 (and save it upon Save). https://bugzilla.redhat.com/show_bug.cgi?id=1432070 .../javascripts/controllers/ems_common/ems_common_form_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Please assess the importance of this issue and update the priority accordingly. Somewhere it was missed in the bug triage process. Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#priority for a reminder on each priority's definition. If it's something like a tracker bug where it doesn't matter, please set it to Low/Low. https://github.com/ManageIQ/manageiq-schema/pull/98 migration will fix this on master. QE: To hit this you need to first run old enough version that allows empty hawkular port, e.g. 5.8.0. Save such provider (comment 5 has details). Then upgrade to last 5.8.z or 5.9 (to verify 5.8 or 5.9 fix, they're completely different). In both cases, it should then be possible to edit the provider. New commit detected on ManageIQ/manageiq-schema/master: https://github.com/ManageIQ/manageiq-schema/commit/dd5ed573ab27b7a54c362403be8e38a9a9aea021 commit dd5ed573ab27b7a54c362403be8e38a9a9aea021 Author: Beni Cherniavsky-Paskin <cben> AuthorDate: Thu Oct 19 00:50:45 2017 +0300 Commit: Beni Cherniavsky-Paskin <cben> CommitDate: Mon Oct 30 17:47:53 2017 +0200 Convert invalid containers hawkular Endpoints port=nil to port=443 For a time (before https://github.com/ManageIQ/manageiq-ui-classic/pull/1172), it was possible in UI to save containers provider without hawkular port and then it'd be impossible to edit the provider as UI would crash. AFAICT, such providers were effectively using port 443 (builds hawkular url https://<host>/ without port, HTTPS defaults to 443). This migration normalizes such endpoints to port 443. This makes it possible to edit in UI, without adding a nil special case. We'll also be able to simplify hawkular connection code in future. https://bugzilla.redhat.com/show_bug.cgi?id=1432070 ...0131403_fix_hawkular_endpoints_with_port_nil.rb | 25 +++++++++ ...03_fix_hawkular_endpoints_with_port_nil_spec.rb | 65 ++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 db/migrate/20171030131403_fix_hawkular_endpoints_with_port_nil.rb create mode 100644 spec/migrations/20171030131403_fix_hawkular_endpoints_with_port_nil_spec.rb It is not possible to click on verify button, when the hostname is Thanks! Version 5.9.0.17.20180116225234_ac8b6f5 |