Feature #10865
closed[Crunch2] [Crunch1] Disable crunch1 APIs by default on new installs
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
Updated by Nico César almost 8 years ago
- File jobs_api_label.png jobs_api_label.png added
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.
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.
Updated by Tom Morris about 7 years ago
- Target version set to Arvados Future Sprints
Updated by Tom Morris about 6 years ago
- Target version changed from Arvados Future Sprints to 2018-10-03 Sprint
Updated by Lucas Di Pentima about 6 years ago
A couple of questions:
- Should the ‘disable_api_methods’ section on the docs site (http://doc.arvados.org/install/install-api-server.html) be updated to name this new setting?
- Do you think is it possible to test this using our current testing framework?
Updated by Peter Amstutz about 6 years ago
Lucas Di Pentima wrote:
A couple of questions:
- Should the ‘disable_api_methods’ section on the docs site (http://doc.arvados.org/install/install-api-server.html) be updated to name this new setting?
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.
Updated by Peter Amstutz about 6 years ago
Updated by Lucas Di Pentima about 6 years ago
49e18f8c16bda6b6bf56c301b440c9d56d9bcb72 LGTM, thanks!
Updated by Peter Amstutz about 6 years ago
- Status changed from New to Resolved
Applied in changeset arvados|a2d7b1241424ea22e5ee81818d6562f92ee2731d.