Bug #17864

Show smart proxy errors on unattended failure

Added by Daniel Lobato Garcia 5 months ago. Updated 3 months ago.

Status:Closed
Priority:Normal
Assigned To:Daniel Lobato Garcia
Category:Unattended installations
Target version:Team Daniel - Iteration 9
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4142
Story points-
Velocity based estimate-
Release1.14.1Release relationshipAuto

Description

If your proxy is has some error (like misconfigured sudoers, puppet not available, etc...) and you try to boot a host through unattended mode [1], the exception will not show up when you try to fetch the kickstart template. Instead, it will show something like No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be called successfully.

The application controller should be aware of this situation and don't try to redirect to back in it, instead just render the error.

[1] an example of such error - ProxyAPI::ProxyException: ERF12-0104 [ProxyAPI::ProxyException]: Unable to set PuppetCA autosign for tonia-rippeon.lobatolan.home ([RestClient::NotAcceptable]: 406 Not Acceptable) for proxy https://centos7-devel.lobatolan.home:9090/puppet/ca

Associated revisions

Revision a7f4dad2
Added by Daniel Lobato Garcia 5 months ago

Fixes #17864 - Show smart proxy errors on unattended fail

If your proxy is has some error (like misconfigured sudoers, puppet not
available, etc...) and you try to boot a host through unattended
mode [1], the exception will not show up when you try to fetch the
kickstart template. Instead, it will show something like No HTTP_REFERER
was set in the request to this action, so redirect_to :back could not be
called successfully.

The application controller should be aware of this situation and don't
try to redirect to back in it, instead just render the error.

[1] an example of such error - ProxyAPI::ProxyException: ERF12-0104
[ProxyAPI::ProxyException]: Unable to set PuppetCA autosign for
tonia-rippeon.lobatolan.home ([RestClient::NotAcceptable]: 406 Not
Acceptable) for proxy
https://centos7-devel.lobatolan.home:9090/puppet/ca

History

#1 Updated by The Foreman Bot 5 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4142 added

#2 Updated by Anonymous 5 months ago

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

#3 Updated by Dominic Cleal 5 months ago

  • Release set to 1.14.1

#4 Updated by Daniel Lobato Garcia 4 months ago

  • Target version set to Team Brad - Iteration 11

#5 Updated by Brad Buckingham 3 months ago

  • Target version deleted (Team Brad - Iteration 11)

#6 Updated by Daniel Lobato Garcia 3 months ago

  • Target version set to Team Daniel - Iteration 9

Also available in: Atom PDF