Skip to content

Resolve job targets eagerly - #104

Open
plotnick wants to merge 1 commit into
illumos-fixesfrom
resolve-targets
Open

plotnick wants to merge 1 commit into
illumos-fixesfrom
resolve-targets

Conversation

@plotnick

Copy link
Copy Markdown
Collaborator

Previously, we resolved cubby numbers as job targets at execution time, using the server's currently available cubby map. The problem is that soon after boot, that cubby map is still empty, and so the server silently skipped jobs that named its cubby. In addition, a job that targeted a sled that was down or absent at job submission time could run whenever that sled later rejoined, perhaps quite a lot later (#75).

With this change, job targets are resolved once up front by the accepting sled. It filters out the sleds it doesn't have a link to, and gossips the resolved targets with the job start request. Each sled checks that the signed target matches the gossiped target. Jobs that name an unreported cubby or have no reachable sled are refused.

Starting a job now returns the sleds it will run on. The client reports any named sled the job will not run on, and a waiting client or server waits for exactly those sleds.

Fixes #75.

@plotnick
plotnick marked this pull request as ready for review October 26, 2026 04:15
@plotnick plotnick mentioned this pull request Oct 26, 2026
Previously, we resolved cubby numbers as job targets at execution time,
using the server's currently available cubby map. The problem is that
soon after boot, that cubby map is still empty, and so the server
silently skipped jobs that named its cubby. In addition, a job that
targeted a sled that was down or absent at job submission time could
run whenever that sled later rejoined, perhaps quite a lot later (#75).

With this change, job targets are resolved once up front by the
accepting sled. It filters out the sleds it doesn't have a link to,
and gossips the resolved targets with the job start request. Each
sled checks that the signed target matches the gossiped target.
Jobs that name an unreported cubby or have no reachable sled are
refused.

Starting a job now returns the sleds it will run on. The client reports
any named sled the job will not run on, and a waiting client or server
waits for exactly those sleds.

Fixes #75.

Co-authored-by: Claude <noreply@anthropic.com>

@plaidfinch plaidfinch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we resolve the cubby on the receiving sled, rather than in the switch zone proxy? I don't think it functionally matters, so I think this is fine, but I thought I'd ask anyhow.

@plotnick

Copy link
Copy Markdown
Collaborator Author

Why do we resolve the cubby on the receiving sled, rather than in the switch zone proxy?

It doesn't much matter, but the main reason is that the proxy can't see the live gossip links, which we use to compute the resolved set of sleds. So the accepting sled would have to do all the same work anyway.

@plaidfinch

Copy link
Copy Markdown
Collaborator

Why do we resolve the cubby on the receiving sled, rather than in the switch zone proxy?

It doesn't much matter, but the main reason is that the proxy can't see the live gossip links, which we use to compute the resolved set of sleds. So the accepting sled would have to do all the same work anyway.

Good enough reason for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants