[ARVADOS] created: 2.1.0-1240-g22d2299b6
Git user
git at public.arvados.org
Tue Aug 24 21:18:21 UTC 2021
at 22d2299b6d6280726c9692b72e2109a4fa768969 (commit)
commit 22d2299b6d6280726c9692b72e2109a4fa768969
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Tue Aug 24 16:46:21 2021 -0400
17755: Add ensure_unique_name to avoid collisions on creating cache collection
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/lib/crunchrun/singularity.go b/lib/crunchrun/singularity.go
index 741f54245..74e570bab 100644
--- a/lib/crunchrun/singularity.go
+++ b/lib/crunchrun/singularity.go
@@ -101,7 +101,7 @@ func (e *singularityExecutor) checkImageCache(dockerImageID string, container ar
if len(cl.Items) == 1 {
imageCollection = cl.Items[0]
} else {
- collectionName := collectionName + " " + time.Now().UTC().Format(time.RFC3339)
+ collectionName := "converting " + collectionName
exp := time.Now().Add(24 * 7 * 2 * time.Hour)
err = containerClient.RequestAndDecode(&imageCollection,
arvados.EndpointCollectionCreate.Method,
@@ -112,6 +112,7 @@ func (e *singularityExecutor) checkImageCache(dockerImageID string, container ar
"name": collectionName,
"trash_at": exp.UTC().Format(time.RFC3339),
},
+ "ensure_unique_name": true,
})
if err != nil {
return nil, fmt.Errorf("error creating '%v' collection: %s", collectionName, err)
@@ -141,6 +142,11 @@ func (e *singularityExecutor) LoadImage(dockerImageID string, imageTarballPath s
}
if _, err := os.Stat(imageFilename); os.IsNotExist(err) {
+ // Make sure the docker image is readable
+ if _, err := os.Stat(dockerImageID); err != nil {
+ return err;
+ }
+
e.logf("building singularity image")
// "singularity build" does not accept a
// docker-archive://... filename containing a ":" character,
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list