all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: 69401@debbugs.gnu.org
Subject: bug#69401: /etc/guix/machines.scm symlink can be garbage collected
Date: Thu, 04 Apr 2024 23:55:07 +0200	[thread overview]
Message-ID: <871q7ku72c.fsf@gnu.org> (raw)
In-Reply-To: <Zdw1V9N-SX6wOhLi@3900XT> (Efraim Flashner's message of "Mon, 26 Feb 2024 08:53:11 +0200")

Hi,

Efraim Flashner <efraim@flashner.co.il> skribis:

> Some of the build nodes behind the Berlin build farm have a childhurd
> which can build packages.  Unfortunately, the symlink from
> /etc/guix/machines.scm to the generated file in the store to setup
> offloading has been garbage collected on several of the machines.

Indeed.  Here’s an example:

--8<---------------cut here---------------start------------->8---
root@hydra-guix-108 ~# guix gc -R $(readlink -f /run/current-system) |grep machines.scm
/gnu/store/xg26iis3ydik6zxqk24cyk7h9zli1d25-machines.scm
root@hydra-guix-108 ~# ls -l /etc/guix/machines.scm
lrwxrwxrwx 1 root root 56 Mar  7 11:53 /etc/guix/machines.scm -> /gnu/store/1171q4xhph07ll3mlzlg7igcwg3c98i1-machines.scm
root@hydra-guix-108 ~# stat -L /etc/guix/machines.scm
stat: cannot statx '/etc/guix/machines.scm': No such file or directory
--8<---------------cut here---------------end--------------->8---

Here /etc/guix/machines.scm points to a different ‘machines.scm’ than
the one that is current.  The old one was removed last week:

--8<---------------cut here---------------start------------->8---
root@hydra-guix-108 ~# zgrep 1171q4xhph07ll3mlzlg7igcwg3c98i1 /var/log/mcron.log.1.gz 
2024-03-27 03:00:05 23100 guix gc -F 150G: [46%] deleting '/gnu/store/1171q4xhph07ll3mlzlg7igcwg3c98i1-machines.scm'
--8<---------------cut here---------------end--------------->8---

The /etc/guix/machines.scm link was created on the last deployment
though:

--8<---------------cut here---------------start------------->8---
root@hydra-guix-108 ~# ls -l /etc/guix/machines.scm
lrwxrwxrwx 1 root root 56 Mar  7 11:53 /etc/guix/machines.scm -> /gnu/store/1171q4xhph07ll3mlzlg7igcwg3c98i1-machines.scm
root@hydra-guix-108 ~# guix system describe
Generation 109  Mar 07 2024 11:53:30    (current)
  file name: /var/guix/profiles/system-109-link
  canonical file name: /gnu/store/5m0sjf3x0pslipcbdxm9ml99h0lbh7c8-system
  label: GNU with Linux-Libre 6.6.18
  bootloader: grub-efi
  root device: label: "my-root"
  kernel: /gnu/store/jcr3d8yy531q4i6kgkfmb0r3ghw418mc-linux-libre-6.6.18/bzImage
  channels:
    guix:
      repository URL: https://git.savannah.gnu.org/git/guix.git
      commit: 64d269b983b76553466ac93945d58c7865cf190e
  configuration file: /gnu/store/d4z76lw515padizhl62hydxwygh57p6k-configuration.scm
--8<---------------cut here---------------end--------------->8---

Could it be that the “wrong” activation snippet was run by ‘guix
deploy’?  Here we see the right one:

--8<---------------cut here---------------start------------->8---
root@hydra-guix-108 ~# grep machines.scm $(guix gc -R $(readlink -f /run/current-system) |grep activate-service)
/gnu/store/pgmb9swcx0pljhbw88mgd3zjagz5axvn-activate-service.scm:(eval-when (expand load eval) (let ((extensions (quote ())) (prepend (lambda (items lst) (let loop ((items items) (lst lst)) (if (null? items) lst (loop (cdr items) (cons (car items) (delete (car items) lst)))))))) (set! %load-path (prepend (cons "/gnu/store/pj751v3199vmv6i6sf0szp185ryzcfdg-module-import" (map (lambda (extension) (string-append extension "/share/guile/site/" (effective-version))) extensions)) %load-path)) (set! %load-compiled-path (prepend (cons "/gnu/store/iqbchmbmhmi34bwgv4sm14li9m24dpnl-module-import-compiled" (map (lambda (extension) (string-append extension "/lib/guile/" (effective-version) "/site-ccache")) extensions)) %load-compiled-path))))(begin (unless (or #f (file-exists? "/etc/guix/signing-key.pub")) (system* "/gnu/store/59y43hrlffs8hg1584vg5074jsbfhwjy-guix-1.4.0-16.aeb4943/bin/guix" "archive" "--generate-key")) (begin (use-modules (guix build utils)) (define acl-file "/etc/guix/acl") (if (file-exists? acl-file) (if (and (symbolic-link? acl-file) (store-file-name? (readlink acl-file))) (delete-file acl-file) (rename-file acl-file (string-append acl-file ".bak"))) (mkdir-p (dirname acl-file))) (symlink "/gnu/store/np3babd2h4xh4x4dvm51k6rp3xbsrzyl-acl" acl-file)) (begin (use-modules (guix build utils)) (define machines-file "/etc/guix/machines.scm") (if (file-exists? machines-file) (if (and (symbolic-link? machines-file) (store-file-name? (readlink machines-file))) (delete-file machines-file) (rename-file machines-file (string-append machines-file ".bak"))) (mkdir-p (dirname machines-file))) (symlink "/gnu/store/xg26iis3ydik6zxqk24cyk7h9zli1d25-machines.scm" machines-file)))
--8<---------------cut here---------------end--------------->8---

To be continued…

Ludo’.




  reply	other threads:[~2024-04-04 21:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26  6:53 bug#69401: /etc/guix/machines.scm symlink can be garbage collected Efraim Flashner
2024-04-04 21:55 ` Ludovic Courtès [this message]
2024-04-06 16:00   ` Ludovic Courtès
2024-04-07 23:11     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871q7ku72c.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=69401@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.