Skip to content

Commit

Permalink
fix: slurm launcher authenticates preemption notification (#8928)
Browse files Browse the repository at this point in the history
  • Loading branch information
rb-determined-ai authored Feb 29, 2024
1 parent acded32 commit 9e8cd68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions harness/determined/exec/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import determined as det
from determined.common import api, constants, storage
from determined.common.api import certs
from determined.common.api import authentication, certs
from determined.exec import prep_container

logger = logging.getLogger("determined")
Expand All @@ -22,7 +22,8 @@ def trigger_preemption(signum: int, frame: types.FrameType) -> None:
logger.info("SIGTERM: Preemption imminent.")
# Notify the master that we need to be preempted
cert = certs.default_load(info.master_url)
sess = api.UnauthSession(info.master_url, cert)
utp = authentication.login_with_cache(info.master_url, cert=cert)
sess = api.Session(info.master_url, utp, cert)
sess.post(f"/api/v1/allocations/{info.allocation_id}/signals/pending_preemption")


Expand Down

0 comments on commit 9e8cd68

Please sign in to comment.