Rose-prune on remote host?

Hi,

I’m in the process of moving one of the systems we have from Cylc7/rose to Cylc8/Rose2. I’m encountering some issues with rose-prune on a remote host. When I try to just use rose-prune as it was, I am getting an error sqlite3.OperationalError: no such table: task_jobs. Adding debug flags, I get:

[FAIL] 2023-03-26T22:55:32+0000 no such table: task_jobs
Traceback (most recent call last):
  File "HOME/miniconda3/envs/cylc-8.1.0/lib/python3.10/site-packages/metomi/rose/task_run.py", line 176, in main
    sys.exit(runner(opts, args))
  File "HOME/miniconda3/envs/cylc-8.1.0/lib/python3.10/site-packages/metomi/rose/run.py", line 201, in run
    return self.run_impl(opts, args, uuid, work_files)
  File "HOME/miniconda3/envs/cylc-8.1.0/lib/python3.10/site-packages/metomi/rose/task_run.py", line 130, in run_impl
    return self.app_runner(opts, args)
  File "HOME/miniconda3/envs/cylc-8.1.0/lib/python3.10/site-packages/metomi/rose/run.py", line 201, in run
    return self.run_impl(opts, args, uuid, work_files)
  File "HOME/miniconda3/envs/cylc-8.1.0/lib/python3.10/site-packages/metomi/rose/app_run.py", line 399, in run_impl
    return builtin_app.run(
  File "HOME/miniconda3/envs/cylc-8.1.0/lib/python3.10/site-packages/metomi/rose/apps/rose_prune.py", line 79, in run
    app_runner.suite_engine_proc.job_logs_housekeep_remote(
  File "HOME/miniconda3/envs/cylc-8.1.0/lib/python3.10/site-packages/metomi/rose/suite_engine_procs/cylc.py", line 275, in job_logs_housekeep_remote
    auths = self.get_suite_jobs_auths(
  File "HOME/miniconda3/envs/cylc-8.1.0/lib/python3.10/site-packages/metomi/rose/suite_engine_procs/cylc.py", line 85, in get_suite_jobs_auths
    new_platforms = get_platforms_from_task_jobs(suite_name, cycle)
  File "HOME/miniconda3/envs/cylc-8.1.0/lib/python3.10/site-packages/cylc/rose/platform_utils.py", line 135, in get_platforms_from_task_jobs
    raise db_exc
  File "HOME/miniconda3/envs/cylc-8.1.0/lib/python3.10/site-packages/cylc/rose/platform_utils.py", line 115, in get_platforms_from_task_jobs
    for row in dao.connect().execute(stmt, [cyclepoint]):
sqlite3.OperationalError: no such table: task_jobs

The app conf file is below, where OFFSET_KEEP_OLD_RUNS in this test case is -PT48H

meta=rose_prune
mode=rose_prune

[prune]
prune-remote-logs-at=$OFFSET_KEEP_OLD_RUNS
prune-server-logs-at=$OFFSET_KEEP_OLD_RUNS
prune{work}=$OFFSET_KEEP_OLD_RUNS
prune{share/cycle}=$OFFSET_KEEP_OLD_RUNS

How do I use rose-prune for housekeeping the remote platform these days, pruning directories from log, work, share/cycle?

Thanks.

Whilst I’m curious about the above, I’ve found rose-prune, in our environment, now properly cleans up the remote hosts, so I can run it with one task locally and cleanup both platforms. I guess we’ve got some settings different now, or rose has changed behaviour to work in our environments.

I think you’re trying to run rose_prune remotely?

It is designed to work under rose task-run on the host that runs the suite daemon.

rose_prune — Rose Documentation 2.1.0 documentation

Ah, missed that sentence. Thanks.