[arvados] updated: 2.6.0-196-g42b266e36
git repository hosting
git at public.arvados.org
Mon May 22 18:38:31 UTC 2023
Summary of changes:
services/api/app/models/container_request.rb | 10 ++++++++++
1 file changed, 10 insertions(+)
via 42b266e3667f08b219173c6eb148e1a5500046c1 (commit)
from cefb56587ce9343e035e9a3db1d67ad7b3f092ce (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 42b266e3667f08b219173c6eb148e1a5500046c1
Author: Tom Clegg <tom at curii.com>
Date: Mon May 22 14:36:47 2023 -0400
19860: Fail 'docker pull' faster when RuntimeEngine is singularity.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/services/api/app/models/container_request.rb b/services/api/app/models/container_request.rb
index b07a4c53e..2211e866b 100644
--- a/services/api/app/models/container_request.rb
+++ b/services/api/app/models/container_request.rb
@@ -412,6 +412,16 @@ class ContainerRequest < ArvadosModel
def validate_builtin_command
return if container_image != "arvados/builtin"
if command.length == 3 && command[0..1] == ["docker", "pull"]
+ if new_record? && Rails.configuration.Containers.RuntimeEngine != "docker"
+ # Note this is only checked when creating a new CR --
+ # otherwise a config change could cause unrelated updates to
+ # existing CRs (including cancelling) to start failing.
+ # Although this means a client can bypass the config check by
+ # creating a CR and then changing the container_image in a
+ # separate call, it doesn't much matter: the resulting
+ # container will just fail later, in crunch-run.
+ errors.add(:command, "not available due to cluster configuration: RuntimeEngine is not docker")
+ end
if !mounts.empty?
errors.add(:mounts, "must be empty for builtin docker pull command")
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list