Project

General

Profile

Actions

Bug #23849

closed

Current user is not set when triggering repetitions of recurring actions

Added by Adam Ruzicka about 6 years ago. Updated about 6 years ago.

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

Description

They fail with undefined method id for nil, this is caused by two factors.

1) We rely on User.current always being set in here1

2) By moving the repetition triggering to a hook, it now runs outside of scope of the KeepCurrentUser middleware and therefore the current user is unset.

[1] - https://github.com/theforeman/foreman_remote_execution/commit/cbca3763dfcf5657bc459a2a3bc629c5beaa3c6c#diff-14632ff95ad9bcb6357ed1b5ae94ed50R197

For people googling for the error, the issue can be identified by the following line in logs:

Failed to run hook 'trigger_repeat' for action 'Actions::RemoteExecution::RunHostsJob'

Related issues 2 (0 open2 closed)

Related to foreman-tasks - Bug #21802: Recurring tasks need to be more resilientClosedAdam Ruzicka11/29/2017Actions
Related to Foreman Remote Execution - Bug #24882: recurring jobs ignore organization context of host searchClosedActions
Actions #1

Updated by Adam Ruzicka about 6 years ago

  • Project changed from Foreman Remote Execution to foreman-tasks
  • Subject changed from Recurring REX jobs fail to trigger repetitions to Current user is not set when triggering repetitions of recurring actions
  • Category deleted (Foreman)
Actions #2

Updated by The Foreman Bot about 6 years ago

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

Updated by Adam Ruzicka about 6 years ago

  • Pull request https://github.com/Dynflow/dynflow/pull/286 added
Actions #4

Updated by Ivan Necas about 6 years ago

  • Description updated (diff)
Actions #5

Updated by Ivan Necas about 6 years ago

  • Related to Bug #21802: Recurring tasks need to be more resilient added
Actions #6

Updated by Ivan Necas about 6 years ago

This is a regression from #21802

Actions #7

Updated by Ivan Necas about 6 years ago

  • Bugzilla link set to 1589082
Actions #8

Updated by Ivan Necas about 6 years ago

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

Updated by Daniel Lobato Garcia about 6 years ago

  • Translation missing: en.field_release set to 353
Actions #10

Updated by Daniel Lobato Garcia about 6 years ago

  • Translation missing: en.field_release deleted (353)
Actions #11

Updated by Adam Ruzicka almost 6 years ago

  • Related to Bug #24882: recurring jobs ignore organization context of host search added
Actions

Also available in: Atom PDF