Project

General

Profile

Bug #21797

Updated by Chris Duryee over 4 years ago

If a host is unregistered while there is a GenerateApplicability task in the queue, a big stack trace is logged:

<pre>


```

2017-11-28 12:27:15 [foreman-tasks/action] [E] 404 Not Found (RestClient::NotFound)
| /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/abstract_response.rb:223:in `exception_with_response'
| /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/abstract_response.rb:103:in `return!'
| /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-2.2.0/lib/runcible/base.rb:81:in `block in get_response'
| /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:807:in `call'
| /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:807:in `process_result'
| /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:725:in `block in transmit'
| /opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:853:in `start'
| /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:715:in `transmit'
| /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:145:in `execute'
| /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:52:in `execute'
| /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/resource.rb:67:in `post'
| /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-2.2.0/lib/runcible/base.rb:80:in `get_response'
| /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-2.2.0/lib/runcible/base.rb:68:in `call'
| /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-2.2.0/lib/runcible/resources/consumer.rb:156:in `regenerate_applicability_by_id'
| /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.6.0/app/lib/actions/pulp/consumer/generate_applicability.rb:11:in `invoke_external_task'
</pre> ```

Katello does the correct behavior by marking this task as stopped/warning, but the log message can be concerning to users. Instead, we should just log that the host no longer exists in Pulp.

Back