Repos wont sync

Problem: Repositories will not sync down anymore. We had to restore from a VM snapshot and since then the system does not sync down repos and the tasks are just getting stuck.

I removed all the tasks in the environment, but looks like 1 is still there which i think might be the issue.

Expected outcome:

Foreman and Proxy versions:
Foreman: 3.0.2
Katello: 4.2.2
Proxy: 3.0.2

Foreman and Proxy plugin versions:

Distribution and version: CentOS 7

Other relevant data:
i see a task in the DynFlow UI which i believe is what is the cause of all my issues, but i cannot find a way to remove it. I dont cannot do a foreman-rake destroy of it as it does not exists, i have tried to look on the DB level by running the below, but i cannot see anything. I am in the process of building out a newer foreman instance but i need to keep this alive for 2 more months.

anyone got any ideas as to how i can clean this up.

select * from foreman_tasks_tasks
select * from dynflow_actions
select * from dynflow_steps

d6089bf4-25be-4c58-aa4a-ea5bfc83bfff Actions::Katello::Repository::Sync running warning

Actually my SQL queries were wrong, I am more a MySQL person than a Posgres i didnt add the tailing ; at the end, so after doing that i can see the entry in the DB tables, but i still cannot use the foreman-rake to kill the task…

is it possible for me to remove the entries manually and what harm can that cause or is there a better command to do this.

After revisiting this today this is the error i get in the logs when i try and cancel through DynFlow UI

[2024-11-13T06:09:33.715228 #34623] ERROR -- /client-dispatcher: Could not find an executor for Dynflow::Dispatcher::Envelope[request_id: 3629338b-5624-446c-88da-790f0691c6b6-1, sender_id: 3629338b-5624-446c-88da-790f0691c6b6, receiver_id: Dynflow::Dispatcher::UnknownWorld, message: Dynflow::Dispatcher::Event[execution_plan_id: d6089bf4-25be-4c58-aa4a-ea5bfc83bfff, step_id: 16, event: Dynflow::Action::Cancellable::Cancel, time: , optional: false]] (Dynflow::Error)

and i can see an entry in the DB’s

foreman=# SELECT * FROM dynflow_execution_plans WHERE uuid = 'd6089bf4-25be-4c58-aa4a-ea5bfc83bfff' ;
                 uuid                 | data |  state  | result  |       started_at       | ended_at | real_time | execution_time |               label                |         class          |
  run_flow                |     finalize_flow      |

                                                                  execution_history

                                                                                                  | root_plan_step_id |                                            step_ids

--------------------------------------+------+---------+---------+------------------------+----------+-----------+----------------+------------------------------------+------------------------+--------------
--------------------------+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------+-------------------+----------------------------------------------------------------------------------------
--------
 d6089bf4-25be-4c58-aa4a-ea5bfc83bfff |      | running | warning | 2024-11-06 21:03:32.25 |          |         0 |              0 | Actions::Katello::Repository::Sync | Dynflow::ExecutionPlan | ["S",4,6,9,12
,14,16,18,19,21,25,29,31] | ["S",7,23,27,30,32,34] | [{"time":1730927012,"name":"start execution","world_id":"1caedfc4-0b44-49d8-a373-747b67ae704b"},{"time":1731119968,"name":"terminate execution","world_id"
:"1caedfc4-0b44-49d8-a373-747b67ae704b"},{"time":1731119968,"name":"start execution","world_id":"494617e9-be73-422b-8718-16bea7fadf87"},{"time":1731120387,"name":"terminate execution","world_id":"494617e9-be
73-422b-8718-16bea7fadf87"},{"time":1731120388,"name":"start execution","world_id":"561eae99-6f4c-4cf5-91bb-948fae12153d"},{"time":1731120567,"name":"terminate execution","world_id":"561eae99-6f4c-4cf5-91bb-
948fae12153d"},{"time":1731122283,"name":"start execution","world_id":"e9012b91-ba20-4808-b5fd-430e6168d578"},{"time":1731123187,"name":"terminate execution","world_id":"e9012b91-ba20-4808-b5fd-430e6168d578"
},{"time":1731123188,"name":"start execution","world_id":"320eae37-0686-4dbf-8658-8f1c29c9f744"}] |                 1 | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32
,33,34]
(1 row)