[ARVADOS] updated: f7d32ebcf2e0641cf92d079387dc325d65e35879
Git user
git at public.curoverse.com
Fri Mar 3 16:44:33 EST 2017
Summary of changes:
sdk/cli/bin/crunch-job | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
via f7d32ebcf2e0641cf92d079387dc325d65e35879 (commit)
from dd08615e98e656ae07c6ca26eaa635f6ce8f01b7 (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 f7d32ebcf2e0641cf92d079387dc325d65e35879
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Mar 3 16:41:05 2017 -0500
11138: Show actual image ID when checking whether docker image is loaded.
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 244db6f..e0b2710 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -418,15 +418,17 @@ if ($docker_locator = $Job->{docker_image_locator}) {
$docker_stream =~ s/^\.//;
my $docker_install_script = qq{
loaded() {
- [[ \$($docker_bin inspect --format="{{.ID}}" \Q$docker_hash\E) = \Q$docker_hash\E ]]
+ id=\$($docker_bin inspect --format="{{.ID}}" \Q$docker_hash\E) || return 1
+ echo "image ID is \$id"
+ [[ \${id} = \Q$docker_hash\E ]]
}
-if loaded 2>/dev/null; then
+if loaded >&2 2>/dev/null; then
echo >&2 "image is already present"
exit 0
fi
echo >&2 "docker image is not present; loading"
arv-get \Q$docker_locator$docker_stream/$docker_hash.tar\E | $docker_bin load
-if ! loaded; then
+if ! loaded >&2; then
echo >&2 "`docker load` exited 0, but image is not found (!)"
exit 1
fi
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list