Bug 1379659

Summary: No informative message when hawkular validation fails
Product: Red Hat CloudForms Management Engine Reporter: Jaroslav Henner <jhenner>
Component: ProvidersAssignee: Nimrod Shneor <nshneor>
Status: CLOSED DEFERRED QA Contact: Einat Pacifici <epacific>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bazulay, dajohnso, epacific, gblomqui, jfrey, jhardy, jhenner, obarenbo, simaishi
Target Milestone: GAFlags: jhenner: needinfo-
Target Release: 5.9.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: container
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-01 12:13:36 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:
Attachments:
Description Flags
evm.log none

Description Jaroslav Henner 2016-09-27 11:29:38 UTC
Created attachment 1205172 [details]
evm.log

Description of problem:
I cannot make the metrics working and I cannot find why as when clicking on Validate under the Hawkular tab the only message I get is:

     Credential validation was not successful:

In the evm.log there is nothing much more


Version-Release number of selected component (if applicable):
cfme-appliance-5.6.2.0-1.el7cf.x86_64
cfme-5.6.2.0-1.el7cf.x86_64

How reproducible:
1/1

Steps to Reproduce:
1. Deploy MiQ
2. Deploy OpenShift with metrics
3. Add the OpenShift as a provider
4. Click validate on the Hawkular tab

Actual results:
Not informative error message

Expected results:
Either validation successful or error message describing detail of the failure

Additional info:

Comment 2 Jaroslav Henner 2016-09-27 12:14:18 UTC
So I curled the metrics endpoint and got a not-trimmed version of the error message, containing 

...
  </head>
  <body>
    <div>
      <h1>Application is not available</h1>
      <p>The application is currently not serving requests at this endpoint. It may not have been started or is still starting.</p>
    </div>
  </body>
</html>

So the metrics have failed to start for some reason. That was when deployed using the openshift-ansible.

Comment 4 Federico Simoncelli 2017-04-28 13:01:50 UTC
Jaroslav is this reproducing?
We changed several things in this area lately (5.8).

Comment 5 Jaroslav Henner 2017-07-04 13:24:01 UTC
It is bit better. If I set the endpoint in such a way that CFME gets HTTP 503 -- service unavailable, it tries to display the returned html page in the error.

Credential validation was not successful: <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style type="text/css"> /*! * Bootstrap v3.3.5 (http://getbootstrap.com) * Copyright 2011-2015 Tw...


I would expect it to display
Credential validation was not sucessful: HTTP 503 -- Service unavailable: Foo bar baz ... whatever the response content is.

Comment 6 Nimrod Shneor 2017-12-20 16:15:15 UTC
So I'm not sure we're able to parse the HTML like your'e comment for the simple reason we cannot predict the content / structure of the response apriori but, in the following PR:https://github.com/ManageIQ/manageiq-ui-classic/pull/2862 we do allow for the *full* response to be previewed in the inline alert in the UI - which should give you more information and save you the time doing curl.

I think this solution should be an OK solution given we cannot parse the response - What do you think?

Comment 7 Nimrod Shneor 2018-01-01 12:13:36 UTC
Moving to deferred due the solution proposed in comment #6.