canonical / canonical/testflinger

Reservation expiration is displayed wrong if polling old job

Open
#1,155 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
26
Forks
49
Avg merge
4d 8h
Merged PRs (30d)
16

Description

Minor inconvenience as the information at the bottom shows the current time when polling + reserved time instead of the actual expiration time.

Step to reproduce:

1. Obtain reservation for a job through `testflinger submit --poll ...`.
2. The terminal that is polling is killed.
3. Poll back to the job `testflinger poll `.
4. The Reservation time and countdown is displayed from the time when `testflinger poll` command is called rather than when the job is successfully reserved.

Sample output:

```bash
❯ testflinger poll 04f6f368-f810-4d57-a15e-2a33e90d81c6
*********************************************
* Starting testflinger setup phase on loewy *
*********************************************
Cleaning up container if it exists...
*************************************************
* Starting testflinger provision phase on loewy *
*************************************************
... ...
***********************************************
* Starting testflinger reserve phase on loewy *
***********************************************
... ...

*** TESTFLINGER SYSTEM RESERVED ***
You can now connect to ubuntu@
Current time: [2026-06-15T18:35:58.330224+00:00]
Reservation expires at: [2026-06-18T18:35:58.330257+00:00]
Reservation will automatically timeout in 259200 seconds
To end the reservation sooner use: testflinger-cli cancel 04f6f368-f810-4d57-a15e-2a33e90d81c6
[71:54:06] [reserve] Reservation expires at: [2026-06-20T16:32:31.406608-04:00]
```

Note that the countdown time got restarted to 72 hours, corresponding to the reservation ammount in the job submission manifest.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the `testflinger poll ` command through the reservation output, comparing the displayed countdown with the expiration recorded during the original submission. Done means polling an old job shows its actual reservation expiration and remaining time instead of restarting the countdown from the poll time.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.