Description of problem: When adding/editing provider, one can set the hawkular port to "" (empty string). This causes the validation to pass, but when the same provider is being edited (url like https://10.8.177.87/ems_container/3/edit), the col-md-12 in main-content <div> is empty. Javascript console shows Error: o.hawkular_api_port is null r@https://CENSORED.87/assets/application-8af3fdc53e8044e918c5be446a20a5e3eab6313f497394e4e45df490b1fe1cc4.js:348:2138 s@https://CENSORED.87/assets/application-8af3fdc53e8044e918c5be446a20a5e3eab6313f497394e4e45df490b1fe1cc4.js:245:5805 l/<@https://CENSORED.87/assets/application-8af3fdc53e8044e918c5be446a20a5e3eab6313f497394e4e45df490b1fe1cc4.js:245:5977 To/this.$get</h.prototype.$eval@https://CENSORED.87/assets/application-8af3fdc53e8044e918c5be446a20a5e3eab6313f497394e4e45df490b1fe1cc4.js:245:13482 To/this.$get</h.prototype.$digest@https://CENSORED.87/assets/application-8af3fdc53e8044e918c5be446a20a5e3eab6313f497394e4e45df490b1fe1cc4.js:245:11951 To/this.$get</h.prototype.$apply@https://CENSORED.87/assets/application-8af3fdc53e8044e918c5be446a20a5e3eab6313f497394e4e45df490b1fe1cc4.js:245:13767 l@https://CENSORED.87/assets/application-8af3fdc53e8044e918c5be446a20a5e3eab6313f497394e4e45df490b1fe1cc4.js:244:20812 M@https://CENSORED.87/assets/application-8af3fdc53e8044e918c5be446a20a5e3eab6313f497394e4e45df490b1fe1cc4.js:244:22744 e@https://CENSORED.87/assets/application-8af3fdc53e8044e918c5be446a20a5e3eab6313f497394e4e45df490b1fe1cc4.js:244:23219 application-8af3fdc53e8044e918c5be446a20a5e3eab6313f497394e4e45df490b1fe1cc4.js:244:31216 o.hawkular_api_port is null application-8af3fdc53e8044e918c5be446a20a5e3eab6313f497394e4e45df490b1fe1cc4.js:244:31216 Version-Release number of selected component (if applicable): Version 5.8.0.4.20170307183144_745a3d9 How reproducible: 3/3 Steps to Reproduce: 1. Add the provider with Hawkular endpoint 2. Edit it and set the H. port to "" 3. Try edit it again Actual results: Emty page because of javascript failure because of the port has been set to "" / Null Expected results: It probably shouldn't be possible to set the port to "" It should be possible to edit the provider even though some fields are set to crazy values. Additional info: Spring is just behind corner, it is nice weather outside (:
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
https://github.com/ManageIQ/manageiq-ui-classic/pull/1305
https://github.com/ManageIQ/manageiq-ui-classic/pull/1565
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