guix_mirror_bot pushed a commit to branch master
in repository guix.
commit e328b097c1a1b493d6425ff4fdebb2e9040f1aba
Author: Ludovic Courtès <[email protected]>
AuthorDate: Wed Nov 11 21:34:01 2026 +0100
services: virtual-build-machine: Fix SSH probing used for offloading.
This is a followup to 20a8d331c23018553f9b9479eb6b4f296ab91298, whose SSH
probe logic was unreliable.
* gnu/services/virtualization.scm
(check-vm-availability)[can-connect-to-ssh?]:
Select ‘sock’ for writing. On success, call ‘connect’ again.
Signed-off-by: Ludovic Courtès <[email protected]>
Merges: #12465
---
gnu/services/virtualization.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index caa4649671d..74ea844ec7b 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -1731,8 +1731,9 @@ CONFIG, a <virtual-build-machine>, is up and running."
(or (connect sock address)
;; Wait for at most 0.5s to avoid blocking the
;; build process for too long.
- (match (select (list sock) '() '() 0 500000)
- (((_) () ()) #t)
+ (match (select '() (list sock) '() 0 500000)
+ ((() (_) ())
+ (false-if-exception (connect sock address)))
(_ #f))))
(close-port sock)