Skip to content

hooks enabled: waiting lease causing a wrong state at the exporter once the previous lease ends #241

@evakhoni

Description

@evakhoni

asking a second waiting lease request to the same exporter - then later once we release the first lease, with the exporter still in afterlease state, the client starts connection attempt prematurely, causing the exporter to switch directly from afretLease to beforeLease, then to Available, and eventually to leaseReady (notice the out of order state change!). the client receives a connection lost leaving the exporter stuck in LeaseReady.

 uv run jmp shell --selector hooks=both --duration 30s
[02/16/26 21:57:45] INFO     Acquiring lease 019c6807-c50f-7539-b70c-744061a9a3f5 for selector hooks=both for duration 0:00:30 [jumpstarter.client.lease]
[02/16/26 21:58:15] INFO     Waiting for ready connection at /run/user/1000/jumpstarter-s4qm9c8k/socket [jumpstarter.client.lease]
Error: Connection to exporter lost

 uv run jmp admin get exporter --namespace jumpstarter-lab
NAME             STATUS      ENDPOINT                               DEVICES  AGE
hooks-test-both  LeaseReady  grpc.jumpstarter.10.0.0.1.nip.io:8082  3        6d 
hooks-test-none  Offline     grpc.jumpstarter.10.0.0.1.nip.io:8082  0        6d 

an exporter with no hooks set does not have this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions