unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Ian Eure <ian@retrospec.tv>
Cc: 72686@debbugs.gnu.org,  guix-devel <guix-devel@gnu.org>
Subject: Re: bug#72686: Impossible to remove all offload machines
Date: Sat, 14 Sep 2024 23:55:38 +0900	[thread overview]
Message-ID: <87zfoaqo7p.fsf@gmail.com> (raw)
In-Reply-To: <87plq75cbc.fsf@meson> (Ian Eure's message of "Sat, 17 Aug 2024 09:40:29 -0700")

Hi Ian,

Ian Eure <ian@retrospec.tv> writes:

> Ran into this issue last week.  If you:
>
> - Configure some offload build machines in your operating-system
>  configuration.
> - Reconfigure your system.
> - Remove all offload build machines.
> - Reconfigure your system again.
>
> ...then various guix operations will still try to connect to offload
> machines, even if you reboot the affected client.
>
> This is caused by a bug in the `guix-activation' procedure:
>
>   ;; ... and /etc/guix/machines.scm.
>   #$(if (null? (guix-configuration-build-machines config))
>         #~#f
>         (guix-machines-files-installation
>          #~(list #$@(guix-configuration-build-machines
>           config))))
>
> If there are no build machines defined in the configuration, no
> operation is performed (#f is returned), which leaves the previous
> generation’s /etc/guix/machines.scm in place.
>
> The same issue appears to affect channels:
>
>   ;; ... and /etc/guix/channels.scm...
>   #$(and channels (install-channels-file channels))

Interesting!

> I’d be happy to take a stab at fixing this, but I’m not certain what
> direction to go, or how much to refactor to get there. Should the
> channels/machines files be removed (ignoring errors if they don’t
> exist)?  Should empty files be installed?  Should that happen inline
> in `guix-activation', or in another procedure? Should the filenames be
> extracted to %variables to avoid duplicating between the two places
> they’ll be used?
>
> If someone would like to provide answered, I would contribute a patch.

I guess the simplest would be to attempt to remove the files when there
are no offload machines or channels, in this already existing activation
procedure.  Extracting the file names to %variables sounds preferable
yes, if there's a logical place to store them that is easily shared.

A patch would be dandy!

-- 
Thanks,
Maxim


  reply	other threads:[~2024-09-14 14:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-17 16:40 Impossible to remove all offload machines Ian Eure
2024-09-14 14:55 ` Maxim Cournoyer [this message]
2024-09-15  3:24   ` bug#72686: " Ian Eure
2024-09-15  3:53     ` Ian Eure
2024-09-15 19:06       ` Tomas Volf
2024-09-19  0:35         ` Ian Eure
2024-09-22  2:26     ` Maxim Cournoyer

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87zfoaqo7p.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=72686@debbugs.gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ian@retrospec.tv \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).