Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: comms method configuration #5265

Open
oliver-sanders opened this issue Dec 7, 2022 · 4 comments
Open

client: comms method configuration #5265

oliver-sanders opened this issue Dec 7, 2022 · 4 comments
Labels
question Flag this as a question for the next Cylc project meeting.
Milestone

Comments

@oliver-sanders
Copy link
Member

Currently the communications method can be configured for job -> scheduler communication, however, this config does not apply to any other connections.

How it works: When a job is submitted the comms method for that platform is extracted from the global config on the Scheduler host and written into the job script as an environment variable. When we get the communication client instance this environment variable is checked and an instance of the relevant client implementation is returned.

The problem

So currently we can configure the comms method for:

  • job-scheduler

But not for:

  1. local -> scheduler (shared filesystem to scheduler e.g. cylc trigger)
  2. remote -> scheduler (remote job platform to scheduler but not from a job script)
  3. really remote -> scheduler (somewhere where there isn't a contact file to read)

We need to be able to configure the comms method for (1) & (2) for #5235 (comment). We may one day wish to support (3) too.

Proposal

If CYLC_TASK_COMMS_METHOD is not set, use the [platforms][localhost]communications method configuration from the global config.

With the exception that if we are already on the scheduler host we should always use the TCP client.

Efficiency: Note that the global configuration would NOT need to be read for cylc message commands from jobs because the CYLC_TASK_COMMS_METHOD would overrule the config anyway.

Questions

  1. Ok with this?

  2. The localhost platform already configures:

    • Jobs on the scheduler host.
    • Jobs on hosts which share a FS with the scheduler host.
    • The scheduler host itself (e.g. auto-restart uses the ssh command from localhost).

    Adding this fourth meaning does convolute this a little, but it was convoluted already so does it matter?
    Can we thing of something better?

Pull requests welcome!

@oliver-sanders oliver-sanders added the question Flag this as a question for the next Cylc project meeting. label Dec 7, 2022
@oliver-sanders oliver-sanders added this to the cylc-8.2.0 milestone Dec 7, 2022
@dwsutherland
Copy link
Member

dwsutherland commented Dec 13, 2022

Yes, agreed. and partially addressed in #5235 .. The difference being, job communications can include ssh and poll where the latter doesn't appear to make sense for non-job CLI usage..

So I found it hard to justify using [platforms][localhost]communications method for the CLI if it was intentionally set to poll for use with jobs.. (is this a valid concern?)

Which is why I made something else [CLI]communications method
(we can change this to anything, but not sure it could be the same)

@oliver-sanders
Copy link
Member Author

In practice sites would want to set [platforms][localhost]communications method to match [CLI]communications method so I don't think there is any benefit to separating the two.

@dwsutherland
Copy link
Member

In practice sites would want to set [platforms][localhost]communications method to match [CLI]communications method so I don't think there is any benefit to separating the two.

If they ever set it to poll, it would likely break things... Because some commands don't make sense as poll

@oliver-sanders
Copy link
Member Author

oliver-sanders commented Dec 16, 2022

I don't think poll makes any sense as a localhost configuration. All of the other comms methods ultimately require local TCP so it is an installation requirement that [platform][localhost]communications method = tcp works on the Scheduler hosts. There should be no use case for polling here.

@oliver-sanders oliver-sanders modified the milestones: cylc-8.2.0, cylc-8.3.0 Jul 11, 2023
@oliver-sanders oliver-sanders modified the milestones: cylc-8.3.0, cylc-8.x Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Flag this as a question for the next Cylc project meeting.
Projects
None yet
Development

No branches or pull requests

2 participants