Project

General

Profile

Actions

Feature #9968

open

[Crunch2] [API] Support container request expiry (expires_at)

Added by Tom Clegg about 8 years ago. Updated 8 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
Crunch
Target version:
Story points:
-
Release:
Release relationship:
Auto

Description

See Containers API

Implementation has two parts:

Check for past expiry when creating/updating container requests

Filter CRs on expires_at is null or expires_at>now

This will stop a container when its requesting CR is updated to expires_at=now, for example.

Check expiry periodically

This can be implemented as a Rails script that runs as a cron job (or systemd timer).

A single postgres query should be able to return the containers whose priority has gone out of sync due to expired requests. Something like this:

select c.uuid from containers c
 join container_requests cr on (cr.container_uuid=c.uuid and cr.expires_at is null or cr.expires_at>now)
 where c.priority > 0 and c.state in ('Queued', 'Locked', 'Running')
 having cr.container_uuid is null or max(cr.priority)<c.priority

Run c.update_priority! on the selected containers.

Actions #1

Updated by Tom Morris about 7 years ago

  • Target version set to Arvados Future Sprints
Actions #2

Updated by Tom Morris over 6 years ago

  • Release deleted (11)
Actions #3

Updated by Ward Vandewege over 3 years ago

  • Target version deleted (Arvados Future Sprints)
Actions #4

Updated by Peter Amstutz over 1 year ago

  • Release set to 60
Actions #5

Updated by Peter Amstutz 8 months ago

  • Target version set to Future
Actions

Also available in: Atom PDF