From 7730f41afd90a9c3c83a56adfee09069da66a8e5 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Thu, 4 Jun 2020 14:56:37 +0200 Subject: installer: final: Add some extra logging. * gnu/installer/final.scm (kill-cow-users): Log the killed process name, (umount-cow-store): inform that we are umounting the cow-store. --- gnu/installer/final.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu/installer/final.scm') diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm index 4c2da484c9..ece1aff95c 100644 --- a/gnu/installer/final.scm +++ b/gnu/installer/final.scm @@ -128,7 +128,7 @@ USERS." (match (string-tokenize (read-string port) %not-nul) ((argv0 _ ...) (unless (member (pk (basename argv0)) spare) - (syslog "Killing process ~a~%" pid) + (syslog "Killing process ~a (~a)~%" pid argv0) (kill pid SIGKILL))) (_ #f)))))) pids))) @@ -146,6 +146,8 @@ be much appreciated." (catch #t (lambda () (let ((tmp-dir "/remove")) + (syslog "Unmounting cow-store.~%") + (mkdir-p tmp-dir) (mount (%store-directory) tmp-dir "" MS_MOVE) -- cgit 1.4.1 From ce16b07d10ebda486d6e4cb6fd30fe797125aeac Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 9 Jun 2020 12:33:38 +0200 Subject: installer: final: Remove left-over pk call. * gnu/installer/final.scm (kill-cow-users): Remove pk call. --- gnu/installer/final.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/installer/final.scm') diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm index ece1aff95c..90c76e9d5f 100644 --- a/gnu/installer/final.scm +++ b/gnu/installer/final.scm @@ -127,7 +127,7 @@ USERS." (lambda (port) (match (string-tokenize (read-string port) %not-nul) ((argv0 _ ...) - (unless (member (pk (basename argv0)) spare) + (unless (member (basename argv0) spare) (syslog "Killing process ~a (~a)~%" pid argv0) (kill pid SIGKILL))) (_ #f)))))) -- cgit 1.4.1 From 9392652e911b3963ef0f52f39677a6fc953f1e1e Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 9 Jun 2020 17:29:23 +0200 Subject: installer: final: Dump "guix system init" command output when testing. When debugging the installation tests, it can be very handy to be able to read "guix system init" command output. * gnu/installer/final.scm (install-system): Dump installation command output to the console when running the installation tests. --- gnu/installer/final.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gnu/installer/final.scm') diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm index 90c76e9d5f..e06b104d59 100644 --- a/gnu/installer/final.scm +++ b/gnu/installer/final.scm @@ -205,7 +205,18 @@ or #f. Return #t on success and #f on failure." (lambda () (start-service 'cow-store (list (%installer-target-dir)))) (lambda () - (run-command install-command #:locale locale)) + ;; If there are any connected clients, assume that we are running + ;; installation tests. In that case, dump the standard and error + ;; outputs to syslog. + (if (not (null? (current-clients))) + (with-output-to-file "/dev/console" + (lambda () + (with-error-to-file "/dev/console" + (lambda () + (setvbuf (current-output-port) 'none) + (setvbuf (current-error-port) 'none) + (run-command install-command #:locale locale))))) + (run-command install-command #:locale locale))) (lambda () (stop-service 'cow-store) ;; Remove the store overlay created at cow-store service start. -- cgit 1.4.1 From 478d1270ce4029b7fe5bfbb369f8e35c57b32ab2 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sat, 13 Jun 2020 15:05:22 +0200 Subject: install: final: Add some logging. * gnu/installer/final.scm (umount-cow-store): Add some logging. --- gnu/installer/final.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/installer/final.scm') diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm index e06b104d59..a742c2a0cd 100644 --- a/gnu/installer/final.scm +++ b/gnu/installer/final.scm @@ -155,6 +155,8 @@ be much appreciated." ;; restart it. (restart-service 'guix-daemon) + (syslog "Killing cow users.") + ;; Kill all processes started while the cow-store was active (logins ;; on other TTYs for instance). (kill-cow-users tmp-dir) @@ -162,6 +164,7 @@ be much appreciated." ;; Try to umount the store overlay. Some process such as udevd ;; workers might still be active, so do some retries. (let loop ((try 5)) + (syslog "Umount try ~a~%" (- 5 try)) (sleep 1) (let ((umounted? (false-if-exception (umount tmp-dir)))) (if (and (not umounted?) (> try 0)) -- cgit 1.4.1