Project

General

Profile

Bug #2619

BMC pane renders a full HTML error response from proxy BMC calls

Added by Dominic Cleal almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

My host has a BMC proxy assigned that's giving out a Ruby error response in HTML along the lines of:

LoadError at /bmc/10.1.1.1/chassis/power/status
no such file to load -- rubyipmi

When I'm viewing the host page in Foreman, the BMC tab is rendering the full HTML response from the proxy inline. Since the proxy error response contains CSS too, this is creating a huge mess of the Foreman UI.

Foreman probably shouldn't pass HTML errors along to the browser when the proxy fails.

bmc_error_css.png View bmc_error_css.png 81.5 KB Screenshot of host page rendering a BMC error response Dominic Cleal, 06/05/2013 05:48 AM
Bmc error css

Associated revisions

Revision a933fc25 (diff)
Added by Marek Hulán almost 6 years ago

Fixes #2619 - don't display full output from proxy

Proxy output is logged alongside with backtrace of exception. We display
only exception message in UI.

Revision 70f272e0 (diff)
Added by Marek Hulán almost 6 years ago

Fixes #2619 - don't display full output from proxy

Proxy output is logged alongside with backtrace of exception. We display
only exception message in UI.
(cherry picked from commit a933fc25b6374cf02685b5499f422ae97dec79f7)

History

#2 Updated by Marek Hulán almost 6 years ago

  • Assignee set to Marek Hulán
So the solution in here would be to either
  • remove html or css from output
  • wrap in < pre >...< /pre >
  • put it into iframe so css does not conflict (this one would preserver original look)

comments? thoughts? other suggestions?

#3 Updated by Dominic Cleal almost 6 years ago

I'd vote for (2), wrap it in pre.

#4 Updated by Marek Hulán almost 6 years ago

  • Status changed from New to Ready For Testing

That would generate a lot of html code, backtrace was in table, here's a patch we agreed, just display exception message (e.g. 500 Internal server error)

https://github.com/theforeman/foreman/pull/713

#5 Updated by Marek Hulán almost 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF