* Impossible to remove all offload machines @ 2024-08-17 16:40 Ian Eure [not found] ` <87zfoaqo7p.fsf@gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Ian Eure @ 2024-08-17 16:40 UTC (permalink / raw) To: bug-guix; +Cc: guix-devel 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)) 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. Thanks, — Ian ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <87zfoaqo7p.fsf@gmail.com>]
[parent not found: <87plp560ji.fsf@meson>]
[parent not found: <87ldzt606c.fsf@meson>]
[parent not found: <875xqwivoa.fsf@wolfsden.cz>]
* bug#72686: Impossible to remove all offload machines [not found] ` <875xqwivoa.fsf@wolfsden.cz> @ 2024-09-19 0:35 ` Ian Eure 0 siblings, 0 replies; 3+ messages in thread From: Ian Eure @ 2024-09-19 0:35 UTC (permalink / raw) To: Tomas Volf; +Cc: guix-devel, 72686, Maxim Cournoyer Tomas Volf <~@wolfsden.cz> writes: > [[PGP Signed Part:Undecided]] > > Hello, > > Ian Eure <ian@retrospec.tv> writes: > >> Disregard this, I continued thinking after sending the email >> (as one does) and >> realized that any managed file will be a link into the store -- >> so if the system >> is reconfigured with no build-machines or channels *and* the >> corresponding file >> is a store link, it should be removed; otherwise, it should >> remain untouched. I >> can work with this. > > Will this correctly handle cases where user is managing the file > using > for example extra-special-file? > No, it wouldn’t. > I wonder whether fat-warning approach would not be better. > I think I agree. — Ian ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <87setsmnj2.fsf@gmail.com>]
[parent not found: <87ldwzmdfi.fsf@retrospec.tv>]
* bug#72686: Impossible to remove all offload machines [not found] ` <87ldwzmdfi.fsf@retrospec.tv> @ 2025-01-02 15:02 ` Maxim Cournoyer 0 siblings, 0 replies; 3+ messages in thread From: Maxim Cournoyer @ 2025-01-02 15:02 UTC (permalink / raw) To: Ian Eure; +Cc: guix-devel, 72686 Hi Ian, Ian Eure <ian@retrospec.tv> writes: [...] > Apologies for the silence, life stuff has been eating most of my free > time, but I have a bit of bandwidth to spend on this problem again. As you can see, you are not alone :-). > I took a swing at this, it wasn’t as difficult as I expected. While > this approach gives a smooth upgrade path for those who’ve configured > channels in a stateful way switching to declarative configuration, > it’s possibly bumpy for those already using a declarative config. If > a machine with declarative channels is reconfigured, the channels will > be duplicated from /etc/guix/channels.scm to > /etc/guix/channels-declarative.scm. Using `delete-duplicates' on the > merged channels should avoid major problems, but I think it still > needs a loud entry in news and manual action (deleting > /etc/guix/channels.scm) to upgrade. Given that both approaches will > require manual action, I’m a bit inclined to go with the simpler, and > take over the existing file. That said, I think the failure mode of > the simpler approach (stomping on channels a user may have configured) > is undeniably worse than potentially duplicating channels or > continuing to pull in old ones unexpectedly. Do either of you have a > strong opinion or more information which would help guide this > decision? I still like the option to leave a handcrafted channels.scm alone; I don't think this imperative variant will be obsolete in the future; it's still useful to experiment quickly, avoiding costly reconfigure just to change some bits about a new offload machine. > The root issue at work behind all these problems is that activation > code only sees the desired target config, rather than the current and > target configs. Comparing the current and target configs would allow > the code to more precisely compute the needd change to move from one > state to the next. I think that could be a good change to make, > though it’s obviously going to be much more involved, and IMO will > require discussion outside the scope of this specific bug. The activation is just a script, so if it's useful to check the current value, it should be OK to do so. > I have a draft patch series I hope to send up soon, but need to get > Guix System up in a VM to test first. It does separate declarative > channels into their own config, but doesn’t do the same for build > machines. While I think many fewer users configure build machines > than channels, it’s probably a good idea to use the same approach for > both channels and machines. Yes, it'd be nice to have a uniform approach. The acl file could benefit from the same treatment, I believe (that, and 'guix authorize' should validate that we're not adding the same key multiple times -- warn something along "key XXXX is already authorized". -- Thanks, Maxim ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-02 15:03 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-08-17 16:40 Impossible to remove all offload machines Ian Eure [not found] ` <87zfoaqo7p.fsf@gmail.com> [not found] ` <87plp560ji.fsf@meson> [not found] ` <87ldzt606c.fsf@meson> [not found] ` <875xqwivoa.fsf@wolfsden.cz> 2024-09-19 0:35 ` bug#72686: " Ian Eure [not found] ` <87setsmnj2.fsf@gmail.com> [not found] ` <87ldwzmdfi.fsf@retrospec.tv> 2025-01-02 15:02 ` Maxim Cournoyer
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).