From 831cf86b4fbf7b054640fa46eede6040ad01340f Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 1 Apr 2024 02:54:46 -0500 Subject: Share TMPDIR between GN2 and GN3 --- fallback-deploy.sh | 3 +++ genenetwork/services/genenetwork.scm | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/fallback-deploy.sh b/fallback-deploy.sh index 6e2e9e9..5419d0f 100755 --- a/fallback-deploy.sh +++ b/fallback-deploy.sh @@ -23,6 +23,8 @@ echo Build and install genenetwork fallback container on $HOSTNAME +mkdir -p /export2/guix-containers/genenetwork/tmp +touch /export2/guix-containers/genenetwork/tmp/fallback-tmp mkdir -p /export2/guix-containers/genenetwork/var/lib/acme mkdir -p /export2/guix-containers/genenetwork/etc/genenetwork mkdir -p /export2/data/genenetwork-xapian @@ -35,6 +37,7 @@ container_script=$(guix system container \ --load-path=. \ --verbosity=3 \ --share=/export2/guix-containers/genenetwork/var/lib/acme=/var/lib/acme \ + --share=/export2/guix-containers/genenetwork/tmp=/var/tmp \ --share=/export2/guix-containers/genenetwork/etc/genenetwork=/etc/genenetwork \ --share=/export/data/genenetwork-xapian \ --share=/export/data/genenetwork-sqlite \ diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm index 0fc2fae..6a691b8 100644 --- a/genenetwork/services/genenetwork.scm +++ b/genenetwork/services/genenetwork.scm @@ -230,6 +230,9 @@ object." (list (environment-variable (name "GN2_PROFILE") (value gn2-profile)) + (environment-variable + (name "TMPDIR") + (value "/tmp")) (environment-variable (name "GN2_SETTINGS") (value gn2-conf)) @@ -243,6 +246,10 @@ object." (file-system-mapping (source gn-sourcecode-directory) (target source)) + (file-system-mapping ; GN2 and GN3 need to share TMPDIR + (source "/tmp") + (target "/tmp") + (writable? #t)) (file-system-mapping (source gn2-conf) (target source)) @@ -267,6 +274,9 @@ object." (list (environment-variable (name "GN3_CONF") (value gn3-conf)) + (environment-variable + (name "TMPDIR") + (value "/tmp")) (environment-variable (name "GN3_SECRETS") (value gn3-secrets)) @@ -286,6 +296,10 @@ object." (file-system-mapping (source gn3-data-directory) (target source)) + (file-system-mapping ; GN2 and GN3 need to share TMPDIR + (source "/tmp") + (target "/tmp") + (writable? #t)) (file-system-mapping (source xapian-db) (target source)) -- cgit v1.2.3