Project

General

Profile

Actions

Bug #11561

closed

[API] Limit number of lock/unlock cycles for a given container

Added by Tom Clegg over 7 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Start date:
04/26/2017
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
2.0
Release relationship:
Auto

Description

Currently, if a container cannot be started due to some infrastructure problem (whether or not it's related to the specific container) it will be retried repeatedly forever.

Proposed solution:

Add a site config knob (analogous to num_retries) that limits the number of times a container can be unlocked (moved from Locked to Queued state) before being automatically cancelled.

Add:
  • Config key max_container_dispatch_attempts (default 5)
  • DB column "lock_count" (do not include in API response)
  • Increment lock_count during lock()
  • When unlocking a container, if lock_count >= Rails.configuration.max_container_dispatch_attempts, change state to Cancelled instead of Queued (the unlock API should still respond 200 in this case) and update runtime_status[error] with an error message.

Write tests and update documentation.


Subtasks 1 (0 open1 closed)

Task #14837: Review 11561-limit-container-locksResolvedPeter Amstutz04/26/2017

Actions

Related issues 4 (0 open4 closed)

Related to Arvados - Bug #11190: Containers seem to run more than once, which isn't supposed to happenResolvedTom Clegg03/01/2017

Actions
Related to Arvados - Bug #18102: max dispatch attempts errorResolvedTom Clegg09/07/2021

Actions
Has duplicate Arvados - Bug #14540: [API] Limit number of container lock/unlock cyclesDuplicate

Actions
Is duplicate of Arvados - Bug #9688: [Crunch2] Limit number of dispatch attempts per containerResolved08/02/2016

Actions
Actions

Also available in: Atom PDF