Project

General

Profile

Actions

Feature #10865

closed

[Crunch2] [Crunch1] Disable crunch1 APIs by default on new installs

Added by Tom Clegg almost 8 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Story points:
0.5
Release:
Release relationship:
Auto

Description

Background

Currently install docs say the jobs API (crunch1) is deprecated, but the installation procedure results in a system that tries to run crunch1 jobs.

Requirements

A site that is already using the Jobs API should have the Jobs API enabled by default (but the sysadmin should be able to disable it).

A new install should have the Jobs API disabled by default (but the sysadmin should be able to enable it).

Implementation

Add a config entry:

  # Enable the legacy Jobs API.
  # auto -- (default) enable the Jobs API only if it has been used before
  #         (i.e., there are job records in the database)
  # true -- enable the Jobs API despite lack of existing records.
  # false -- disable the Jobs API despite presence of existing records.
  enable_legacy_jobs_api: auto

If the legacy jobs API is disabled according to this config knob, API server should automatically disable all of the Jobs APIs, i.e., implicitly add these to Rails.configuration.disable_api_methods:

disable_api_methods:
 - jobs.create
 - pipeline_instances.create
 - pipeline_templates.create
 - jobs.get
 - pipeline_instances.get
 - pipeline_templates.get
 - jobs.list
 - pipeline_instances.list
 - pipeline_templates.list
 - jobs.index
 - pipeline_instances.index
 - pipeline_templates.index
 - jobs.update
 - pipeline_instances.update
 - pipeline_templates.update
 - jobs.queue
 - jobs.queue_size
 - job_tasks.create
 - job_tasks.get
 - job_tasks.list
 - job_tasks.index
 - job_tasks.update
 - jobs.show
 - pipeline_instances.show
 - pipeline_templates.show
 - jobs.show
 - job_tasks.show

Update the install documentation:

Add the enable_legacy_jobs_api option to the "Configure the API server" section on http://doc.arvados.org/install/install-api-server.html


Files

jobs_api_label.png (60.8 KB) jobs_api_label.png mock of what Nico is refering to on the workbench Nico César, 01/11/2017 08:40 PM

Subtasks 1 (0 open1 closed)

Task #14239: Review 10865-legacy-jobs-apiResolvedLucas Di Pentima01/11/2017Actions
Actions #1

Updated by Ward Vandewege almost 8 years ago

  • Description updated (diff)
Actions #2

Updated by Nico César almost 8 years ago

  • File crunchV1_label.png added
Actions #4

Updated by Nico César almost 8 years ago

  • File deleted (crunchV1_label.png)
Actions #5

Updated by Tom Morris almost 8 years ago

The Jobs portion of the V1 API is most definitely not deprecated. The install docs should be corrected ASAP. It's the only thing which works for the overwhelming majority of our installations. It's fine to have an intention to move away from it, but it can't be deprecated until there's something to replace it.

Any easy config mechanism is a good thing, but it can't default to relying on an empty Jobs table as the authority. Do we not already know what cloud vendor they're configuring (seems like we need this info)? Assuming we have that info, we can use non-cloud/local/HPC as the signal for enable_jobs: false, otherwise it should be enable_jobs: true.

The concerns about Workbench are valid, but orthogonal.

Actions #6

Updated by Tom Clegg almost 8 years ago

Hm. I don't know about "most definitely not deprecated". The install docs mention "Jobs API support (deprecated)" and guide people to set things up for the Containers API instead.

If we revert that, so the install docs leave you with the Jobs API, then the motivation for this ticket seems to go away: "a system that tries to run crunch1 jobs" will be the correct behavior.

Actions #7

Updated by Tom Morris about 7 years ago

  • Target version set to Arvados Future Sprints
Actions #8

Updated by Peter Amstutz about 7 years ago

  • Description updated (diff)
Actions #9

Updated by Peter Amstutz about 7 years ago

  • Description updated (diff)
Actions #10

Updated by Tom Morris about 6 years ago

  • Target version changed from Arvados Future Sprints to 2018-10-03 Sprint
Actions #11

Updated by Peter Amstutz about 6 years ago

  • Assigned To set to Peter Amstutz
Actions #12

Updated by Lucas Di Pentima about 6 years ago

A couple of questions:

Actions #13

Updated by Peter Amstutz about 6 years ago

Lucas Di Pentima wrote:

A couple of questions:

Oops, yes, I meant to do that and I forgot.

  • Do you think is it possible to test this using our current testing framework?

Yea, I might be able to refactor it to do something like that.

Actions #16

Updated by Peter Amstutz about 6 years ago

  • Status changed from New to Resolved
Actions #17

Updated by Tom Morris about 6 years ago

  • Release set to 14
Actions

Also available in: Atom PDF