From d968a5bbb969a3032f4460afcb294e4672dc5aa6 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 9 Feb 2023 09:12:28 +0000 Subject: Share the mysqld socket directory into the container. We ought to share the mysqld socket directory into the container, not the socket itself. If we only shared the socket, when the mysql server is restarted and a new socket is created, the bind mounting into the container would break and the container would need to be restarted. * genenetwork-development-deploy.sh: Share /var/run/mysqld, not /var/run/mysqld/mysqld.sock. * genenetwork-development.scm (genenetwork-shepherd-services): Share /run/mysqld, not /run/mysqld/mysqld.sock. --- genenetwork-development.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'genenetwork-development.scm') diff --git a/genenetwork-development.scm b/genenetwork-development.scm index 638d2c9..688d02f 100644 --- a/genenetwork-development.scm +++ b/genenetwork-development.scm @@ -436,11 +436,14 @@ described by CONFIG, a object." (program-file "genenetwork2" (genenetwork2-cd-gexp config)) #:name "genenetwork2-pola-wrapper" + ;; If we mapped only the mysqld.sock + ;; socket file, it would break when the + ;; external mysqld server is restarted. #:mappings (list (file-system-mapping (source genotype-files) (target source)) (file-system-mapping - (source "/run/mysqld/mysqld.sock") + (source "/run/mysqld") (target source) (writable? #t))) #:namespaces (delq 'net %namespaces)) @@ -458,8 +461,11 @@ described by CONFIG, a object." (program-file "genenetwork3" (genenetwork3-cd-gexp config)) #:name "genenetwork3-pola-wrapper" + ;; If we mapped only the mysqld.sock + ;; socket file, it would break when the + ;; external mysqld server is restarted. #:mappings (list (file-system-mapping - (source "/run/mysqld/mysqld.sock") + (source "/run/mysqld") (target source) (writable? #t)) (file-system-mapping -- cgit v1.2.3