Bind a worker's name and labels into its token; list and revoke tokens by jti

This commit is contained in:
2026-10-07 08:42:14 +02:00
parent 9ef7f90dd8
commit 953a983919
16 changed files with 470 additions and 38 deletions
+3 -1
View File
@@ -199,7 +199,9 @@ class SlurmProvisioner:
def _submit(self, profile: SlurmProfile) -> None:
worker = f"{self.name}-{profile.name}-{uuid.uuid4().hex[:8]}"
token = security.create_worker_token(worker, timedelta(hours=TOKEN_HOURS))
token = security.create_worker_token(
worker, timedelta(hours=TOKEN_HOURS), labels=profile.labels
)
try:
result = self._ssh(["sbatch", "--parsable"], self._payload(profile, token))
except (OSError, subprocess.SubprocessError) as exc: