Project

General

Profile

Actions

Bug #23611

closed

ApplicationJob starts when foreman_tasks does not exist

Added by Jonathon Turel over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Fixed in Releases:
Found in Releases:

Description

I discovered this while looking into an issue in Katello on the centos7-katello-nightly forklift VM but I suspect it'll show up after any fresh installation.

ApplicationJobs (using dynflow) are being started when foreman_tasks has not been fully initialized and this error can be seen from several jobs across Foreman and Katello being started:

2018-05-03T00:50:19 [W|dyn|] Error on on_execution_plan_save event
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "foreman_tasks_tasks" does not exist
LINE 8:                WHERE a.attrelid = '"foreman_tasks_tasks"'::r...
                                          ^
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
                     c.collname, col_description(a.attrelid, a.attnum) AS comment
                FROM pg_attribute a
                LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
                LEFT JOIN pg_type t ON a.atttypid = t.oid
                LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
               WHERE a.attrelid = '"foreman_tasks_tasks"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum

I believe it comes down to a timing issue with how these components are installed; hoping to start & track discussion about it here. It seems like even if the jobs do eventually start due to retry attempts, we shouldn't be throwing huge stack traces. I don't mind fixing the problem, but some guidance would be appreciated. To add, it appears that the jobs do eventually start, but after several attempts.

- should we expand ApplicationJob to not start jobs until foreman_tasks and/or dynflow are completely initialized?
- something else?


Related issues 3 (0 open3 closed)

Related to Katello - Bug #23326: multiple paused state "Create Pulpdiskspace" notifications is beng triggered in dynflowClosedJonathon Turel04/19/2018Actions
Related to Foreman - Bug #22833: delayed_plan 'CreateRssNotifications' is failing in 15sec intervals Duplicate03/09/2018Actions
Related to Foreman - Bug #23932: ApplicationJob tests fail when run on jenkins from a pluginClosedAdam Ruzicka06/14/2018Actions
Actions #1

Updated by Jonathon Turel over 6 years ago

  • Related to Bug #23326: multiple paused state "Create Pulpdiskspace" notifications is beng triggered in dynflow added
Actions #2

Updated by Ivan Necas over 6 years ago

  • Project changed from foreman-tasks to Foreman
  • Category deleted (Dynflow)
Actions #3

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Adam Ruzicka
  • Pull request https://github.com/theforeman/foreman/pull/5575 added
Actions #4

Updated by Marek Hulán over 6 years ago

  • Related to Bug #22833: delayed_plan 'CreateRssNotifications' is failing in 15sec intervals added
Actions #5

Updated by Marek Hulán over 6 years ago

  • Bugzilla link set to 1581311
Actions #6

Updated by Ivan Necas over 6 years ago

  • Translation missing: en.field_release set to 330
Actions #7

Updated by Ivan Necas over 6 years ago

  • Status changed from Ready For Testing to Closed
Actions #8

Updated by The Foreman Bot over 6 years ago

  • Pull request https://github.com/theforeman/foreman/pull/5682 added
Actions #9

Updated by Adam Ruzicka over 6 years ago

  • Related to Bug #23932: ApplicationJob tests fail when run on jenkins from a plugin added
Actions

Also available in: Atom PDF