[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: subcommand to pause/resume builds
From: |
Bengt Richter |
Subject: |
Re: RFC: subcommand to pause/resume builds |
Date: |
Wed, 4 Nov 2020 11:28:14 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Hi all,
On +2020-11-03 14:53:07 +0100, Ludovic Courtès wrote:
> Hi,
>
> John Soo <jsoo1@asu.edu> skribis:
>
> > I was looking to pause a long build today and asked on IRC how to
> > accomplish pause/resume. It seems this is possible already with the
> > following:
> >
> > kill --signal SIGSTOP|SIGCONT {pids-of-build-process-tree}
> >
> > There is already a command to list the processes associated to guix
> > commands: guix processes. Perhaps pause/resume can be a subcommand or
> > set of flags to guix processes. The following is the first thing that
> > comes to mind:
> >
> > guix processes --pause package-name ... --resume package-name ...
> >
> > What do you think?
>
> First, note that the daemon is unaware of “packages”, it only knows
> about “derivations”.
>
What if you turned the problem inside out, and made the derivation
volunteer to be paused (at sensible places in its progress)?
I.e., if you defined part of a given derivation
"hash-prefixed-derivation-file-name-in-question.drv"
to do a check for the existence of
/var/guix/daemon-ctl/hash-prefixed-derivation-file-name-in-question.drv.sfx
(.sfx appended to signify special effects :)
ISTM that could open the door for some easy hacks, (and probably some dangers
to watch for :)
E.g. a proof of concept might be just to sleep 6 seconds (say) and repeat
sleep/check
until the file disappears.
IWG this should not change anything for non-volunteering derivations other than
the load-relief
of not running the sleeping process(es).
Then the person wanting to pause the derivation
"hash-prefixed-derivation-file-name-in-question.drv"
could do so simply by
touch
/var/guix/daemon-ctl/hash-prefixed-derivation-file-name-in-question.drv.sfx
and deleting it when wanting to allow it to continue.
Later, if that works, .sfx files could have content, for as yet unimagined
purposes ;)
[...]
>
> Conclusion: I don’t think we can implement this reliably.
>
IDK from the outside, but inside-out, WDYT?
> HTH!
>
> Ludo’.
>
--
Regards,
Bengt Richter
- Re: RFC: subcommand to pause/resume builds, (continued)
- Re: RFC: subcommand to pause/resume builds, Ludovic Courtès, 2020/11/03
- Re: RFC: subcommand to pause/resume builds, John Soo, 2020/11/03
- Re: RFC: subcommand to pause/resume builds, Tobias Geerinckx-Rice, 2020/11/03
- Re: RFC: subcommand to pause/resume builds, Tobias Geerinckx-Rice, 2020/11/03
- Re: RFC: subcommand to pause/resume builds, John Soo, 2020/11/03
- Re: RFC: subcommand to pause/resume builds, John Soo, 2020/11/03
- Re: RFC: subcommand to pause/resume builds, Ludovic Courtès, 2020/11/06
- Re: RFC: subcommand to pause/resume builds, John Soo, 2020/11/06
Re: RFC: subcommand to pause/resume builds,
Bengt Richter <=
Re: RFC: subcommand to pause/resume builds, Mark H Weaver, 2020/11/06
RFC: subcommand to pause/resume builds, John Soo, 2020/11/04