Project

General

Profile

Bug #21797

do not log stack trace if generateapplicability generates a 404

Added by Chris Duryee almost 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hosts
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:

Description

If a host is unregistered while there is a GenerateApplicability task in the queue, a big stack trace is logged (top few lines shown):

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'

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.


Related issues

Related to Katello - Bug #24077: Uncaught exception when pulp task isnt created from dynflow stepNew

Associated revisions

Revision c2f5ec4f (diff)
Added by Chris Duryee over 3 years ago

Fixes #21797 - handle various edge cases related to registration

This commit fixes various edge cases and errors related to
registration and hosts unregistering before actions complete.

This is tied closely to #21703.

History

#1 Updated by Chris Duryee almost 4 years ago

  • Description updated (diff)

#2 Updated by Chris Duryee almost 4 years ago

  • Description updated (diff)

#3 Updated by Chris Duryee over 3 years ago

  • Project changed from Runcible to Katello

#4 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7206 added

#5 Updated by Justin Sherrill over 3 years ago

  • Legacy Backlogs Release (now unused) set to 338
  • Category set to Hosts

#6 Updated by Chris Duryee over 3 years ago

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

#7 Updated by Zach Huntington-Meath over 3 years ago

  • Legacy Backlogs Release (now unused) changed from 338 to 284

#8 Updated by The Foreman Bot over 3 years ago

  • Pull request https://github.com/Katello/katello/pull/7214 added

#9 Updated by Adam Ruzicka over 3 years ago

  • Related to Bug #24077: Uncaught exception when pulp task isnt created from dynflow step added

Also available in: Atom PDF