Recurring logics

Problem:
Recurrings logics doesn’t work with dynamic query

Expected outcome:
Running recurring schedule job using dynamic query

Foreman and Proxy versions:
1.17.0
Foreman and Proxy plugin versions:
bastion 6.1.8
foreman-tasks 0.11.2
foreman_ansible 2.0.1
foreman_discovery 11.0.0
foreman_docker 4.0.0
foreman_hooks 0.3.14
foreman_remote_execution 1.4.5
katello 3.6.0

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]

I’ve tried to setup a recurring job to run ansible playbook using a host_collection with dynamic quey. I do use “host_collection_id = 3” and when setting up the job it returns :
Warning! Could not render the preview because no host matches the search query.

The host collection contains 12 hosts.

On the “host” tab of the recurring job I see the following error message:
The dynamic query ‘host_collection_id = 3’ was not resolved yet. The list of hosts to which it would resolve now can be seen here.

Any idea what’s wrong?

Thanks and rgds,
Arsene

The dynamic search query evaluates just before the execution, does that fail? From what you described, I’m not sure I see a buggy behavior. The warning explanation is a bit misleading. We could perhaps list hosts which the execution would use today with warning this can change tomorrow.

Yes exactly the dynamic search query fails. When using the same query for a job to run immediately it works and the query returns 12 hosts, but when using it on a recurring job it just fails.
As you may see the query hasn’t any complicated logic’s in there.
I couldn’t find anythings in the logs, perhaps i need to increase loglevel…

Any hint how to get this resolved?

Thanks

I think this could be a bug that @aruzicka opened today - Bug #23849: Recurring REX jobs fail to trigger repetitions - Foreman Remote Execution - Foreman

I’m afraid the bug I opened yesterday is another one. I found it when looking into what @Arsene described. I’m still looking into it and I’ll keep you posted.

I just deployed a fresh katello machine and it seems to work for me :confused:

Could you bump the log level to debug, try to run it again and then paste the relevant parts of production.log somewhere? And optionally some screenshots might help as well.