Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1421872 - "Host not found for ID" message logs entire stack trace
Summary: "Host not found for ID" message logs entire stack trace
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Errata Management
Version: 6.2.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Chris Duryee
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-13 22:36 UTC by Chris Duryee
Modified: 2019-04-01 20:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18486 0 None None None 2017-02-13 22:49:12 UTC

Description Chris Duryee 2017-02-13 22:36:47 UTC
Description of problem:

The "montior event queue" task will pull tasks off the event queue and kick off a generate applicability task. However, if it attempts to find a host that does not exist, it will log a message and then log a lengthy stack trace. The stack trace is not useful and makes it appear that bad things are happening when in fact it's likely fine that the host was not found.


Version-Release number of selected component (if applicable): 6.2.7

Steps to Reproduce:
1. in dynflow, disable "monitor event queue"
2. queue up an applicability regen for a host, confirm with "select count(*) from katello_events"
3. delete host
4. restart event queue job

Actual results: error with stack trace

Expected results: warning message instead of error, no stack trace


Additional info: this seems minor, but it logs 99 lines of message every time this happens.

Comment 1 Satellite Program 2017-02-13 23:14:17 UTC
Upstream bug assigned to cduryee

Comment 2 Satellite Program 2017-02-13 23:14:19 UTC
Upstream bug assigned to cduryee

Comment 3 Satellite Program 2017-02-14 17:14:12 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18486 has been resolved.

Comment 8 Lukáš Hellebrandt 2018-01-03 15:02:36 UTC
Verified with Sat6.3 snap 30.

Used steps from comment 7. Only changed point 2 as it was wrong, the correct way to cancel the "monitor event queue" job is to run """
foreman-rake foreman_tasks:cleanup TASK_SEARCH='label = Actions::Katello::EventQueue::Monitor' STATES=running VERBOSE=true
""".

After running "service foreman-tasks restart", the following message is shown and is followed by traceback (full traceback in attachment):

2018-01-03 09:06:44  [foreman-tasks/dynflow] [E] invalidated execution plan 385cd024-af7b-42c1-a276-f8947066e34d missing, skipping
2018-01-03 09:06:44  [foreman-tasks] [W] Could not load execution plan f3c1e4d1-0ada-43c8-841a-ad88e741387a for task 0f14591e-6923-4713-8d32-0c06e0c91bf3
 | RuntimeError: The Dynflow world was not initialized yet. If your plugin uses it, make sure to call ForemanTasks.dynflow.require! in some initializer
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6.3/lib/foreman_tasks/dynflow.rb:82:in `world'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.9.6.3/app/models/foreman_tasks/task/dynflow_task.rb:53:in `execution_plan'
[...]

However, this is caused by killing the "monitor event queue" task.

Also, the message "[app] [W] Host not found for ID <ID>" is printed in production.log. It is, however, NOT followed by any traceback - which was the goal of this BZ.

Comment 9 Satellite Program 2018-02-21 16:54:37 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> > 
> > For information on the advisory, and where to find the updated files, follow the link below.
> > 
> > If the solution does not work for you, open a new bug report.
> > 
> > https://access.redhat.com/errata/RHSA-2018:0336


Note You need to log in before you can comment on or make changes to this bug.