Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #17864 - Show smart proxy errors on unattended fail #4142

Merged
merged 1 commit into from
Jan 5, 2017

Conversation

dLobatog
Copy link
Member

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

@mention-bot
Copy link

@dLobatog, thanks for your PR! By analyzing the history of the files in this pull request, we identified @domcleal, @ohadlevy and @ares to be potential reviewers.

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
@dLobatog
Copy link
Member Author

dLobatog commented Jan 3, 2017

[test upgrade]

@tbrisker tbrisker merged commit a7f4dad into theforeman:develop Jan 5, 2017
@tbrisker
Copy link
Member

tbrisker commented Jan 5, 2017

Thanks @dLobatog !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants