Project

General

Profile

Actions

Bug #24882

closed

recurring jobs ignore organization context of host search

Added by Ivan Necas over 5 years ago. Updated over 5 years ago.

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

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1627640

Description of problem:

When you create recurring job in the context of Default Organization

Monitor > Jobs > Run job

Job category: Commands
Job Template: Run Command - SSH Default
Search Query: last_report > "35 minutes ago"
Command: true repeat 3
Schedule: Set up recurring execution
Repeats: cronline
Cron line: * * * * *
Repeat N times: 3
Ends: Never

the first job is scheduled for all active hosts in Default Organization (one)
but then all repetitions of the jobs are scheduled for all active hosts across all organizations (two)

in the Job invocations page (Monitor > jobs) jobs does not provide correct host count

Description Status Succeeded Failed Pending Total hosts Start
Run true repeat 3 succeeded 2 0 0 1 29 minutes ago
Run true repeat 3 succeeded 2 0 0 1 30 minutes ago
Run true repeat 3 succeeded 1 0 0 1 31 minutes ago

Failed is two but Total host is only one

And the jobs detail page show nonsense result data like 200% Failed, or Infinity% Failed ..

How reproducible:
always

Expected results:
- recurring jobs are scheduled for the proper set of hosts
- job list page shows correct host count data and/or shows jobs filtered according to organization
- job details page does not show nonsense data like 200% Success or Infinity% Success


Related issues 3 (0 open3 closed)

Related to foreman-tasks - Bug #23849: Current user is not set when triggering repetitions of recurring actionsClosedAdam Ruzicka06/07/2018Actions
Related to foreman-tasks - Bug #24895: The KeepCurrentTaxonomies middleware should be enabled by defaultClosedAdam RuzickaActions
Related to Foreman Remote Execution - Bug #25144: The job invocation details should show in which context (organization, location) it has been runClosedActions
Actions #1

Updated by Adam Ruzicka over 5 years ago

  • Related to Bug #23849: Current user is not set when triggering repetitions of recurring actions added
Actions #2

Updated by Adam Ruzicka over 5 years ago

  • Subject changed from recurring jobs ignore organization context of host search to recurring jobs ignore organization context of host search

I thought the cross-org planning would be handled by #23849, I'll have to look into this.

Actions #3

Updated by Adam Ruzicka over 5 years ago

  • Related to Bug #24895: The KeepCurrentTaxonomies middleware should be enabled by default added
Actions #4

Updated by Ivan Necas over 5 years ago

  • Status changed from New to Closed
Actions #5

Updated by Ivan Necas over 5 years ago

  • Related to Bug #25144: The job invocation details should show in which context (organization, location) it has been run added
Actions

Also available in: Atom PDF