Subject: bug#56320: 'guix system' failure due to substitute being temporarily 404 -> Implement a retry attempts?

From: Jacob Hrbek <[email-masked]>
Date: Thu, 30 Jun 2022 08:19:38 +0000

Seems that the substitute server went down just as i was doing `guix 
system reconfigure /path/to/config.scm` which produced a failure thus 
proposing to implement a retry attempts to make this process more 
reliable in mission critical environment

substitute: updating substitutes from 
'https://substitutes.domain.tld'...   0.0%Backtrace:
substitute: In ice-9/boot-9.scm:
substitute:   1752:10 17 (with-exception-handler _ _ #:unwind? _ # _)
substitute: In unknown file:
substitute:           16 (apply-smob/0 #<thunk 7f93f45d22e0>)
substitute: In ice-9/boot-9.scm:
substitute:     724:2 15 (call-with-prompt _ _ #<procedure 
default-prompt-handle…>)
substitute: In ice-9/eval.scm:
substitute:     619:8 14 (_ #(#(#<directory (guile-user) 7f93f45d7c80>)))
substitute: In guix/ui.scm:
substitute:    2230:7 13 (run-guix . _)
substitute:   2193:10 12 (run-guix-command _ . _)
substitute: In ice-9/boot-9.scm:
substitute:   1752:10 11 (with-exception-handler _ _ #:unwind? _ # _)
substitute:   1752:10 10 (with-exception-handler _ _ #:unwind? _ # _)
substitute: In guix/scripts/substitute.scm:
substitute:    757:18  9 (_)
substitute:    348:26  8 (process-query #<output: file 4> _ #:cache-urls 
_ #:acl _)
substitute: In guix/substitutes.scm:
substitute:    365:27  7 (lookup-narinfos/diverse _ _ #<procedure 
7f93f229df40 …> …)
substitute:    322:31  6 (lookup-narinfos 
"https://substitutes.domain.tld" _ # _ …)
substitute:    245:26  5 (fetch-narinfos _ _ #:open-connection _ # _)
substitute: In ice-9/boot-9.scm:
substitute:   1685:16  4 (raise-exception _ #:continuable? _)
substitute:   1685:16  3 (raise-exception _ #:continuable? _)
substitute:   1780:13  2 (_ #<&compound-exception components: (#<&error> 
#<&orig…>)
substitute:   1685:16  1 (raise-exception _ #:continuable? _)
substitute:   1685:16  0 (raise-exception _ #:continuable? _)
substitute:
substitute: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
substitute: In procedure write_wait_fd: unimplemented
guix system: error: 
`/gnu/store/5hzz6px2jp2kx8fnvfg80m6f6al3y190-guix-1.3.0-27.598f728/bin/guix 
substitute' died unexpectedly

-- 
-- Jacob Hrbek #StandWithUkraine