Feature #10865

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

Added by Tom Clegg almost 3 years ago. Updated about 1 year ago.

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

100%

Estimated time:
(Total: 0.00 h)
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

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

Task #14239: Review 10865-legacy-jobs-apiResolvedLucas Di Pentima

Associated revisions

Revision a2d7b124
Added by Peter Amstutz about 1 year ago

Merge branch '10865-legacy-jobs-api' closes #10865

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <>

History

#1 Updated by Ward Vandewege almost 3 years ago

  • Description updated (diff)

#2 Updated by Nico César almost 3 years ago

  • File crunchV1_label.png added

#4 Updated by Nico César almost 3 years ago

  • File deleted (crunchV1_label.png)

#5 Updated by Tom Morris almost 3 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.

#6 Updated by Tom Clegg almost 3 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.

#7 Updated by Tom Morris about 2 years ago

  • Target version set to Arvados Future Sprints

#8 Updated by Peter Amstutz about 2 years ago

  • Description updated (diff)

#9 Updated by Peter Amstutz about 2 years ago

  • Description updated (diff)

#10 Updated by Tom Morris about 1 year ago

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

#11 Updated by Peter Amstutz about 1 year ago

  • Assigned To set to Peter Amstutz

#12 Updated by Lucas Di Pentima about 1 year ago

A couple of questions:

#13 Updated by Peter Amstutz about 1 year 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.

#16 Updated by Peter Amstutz about 1 year ago

  • Status changed from New to Resolved

#17 Updated by Tom Morris about 1 year ago

  • Release set to 14

Also available in: Atom PDF