Skip to content

ctrl+c does not work when used with both --host and --no-detach #6585

@oliver-sanders

Description

@oliver-sanders

If you are running a workflow remotely in no-detach mode, then running ctrl+c only kills the local process (which is essentially just doing cylc cat-log -m t at this point) but does not send the kill signal to the reinvoked remote process.

This makes perfect sense, the scheduler command was reinvoked on a remote host, ctrl+c is not going to kill that. However, this is inconsistent with the localhost behavior and the host config can be set in the global config so the user is not necessarily aware that the scheduler is being invoked remotely (caught me out!).

Reproducible Example

[me] $ cylc vip --host=other --no-detach myworkflow
...
^C
[me] $ cylc scan -f name
myworkflow
[me] $ echo 'confused!'

Options

  1. Don't allow this combination of options: play: --no-detach should infer --host=localhost #4886
  2. Capture KeyboardInterrupt and log a message explaining that the scheduler is still running.
  3. Capture KeyboardInterrupt and invoke a subprocess to run ssh <server> kill <pid> 🤮 .

I don't think that this combination of options is ever used intentionally so would lean towards option (1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is wrong :(questionFlag this as a question for the next Cylc project meeting.small

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions