Re: Stopping and restarting poudriere

From: Mark Millard via freebsd-ports <freebsd-ports_at_freebsd.org>
Date: Tue, 08 Jun 2021 18:05:51 UTC
On 2021-Jun-8, at 10:54, Mark Millard <marklmi at yahoo.com> wrote:
> 
> bob prohaska <fbsd_at_www.zefox.net> wrote on
> Date: Tue, 8 Jun 2021 07:56:24 -0700 :
> 
>> Is it possible to  restart a poudriere build session so it picks up
>> where it left off?
>> 
>> I mistakenly hit a control-c in the controlling terminal of a long
>> build and would like to restart it with minimum lost work.
> 
> Packages that had already built and been put in the .building
> temporary repository that it uses will not be rebuilt if I
> remember right: the ones from that repository will be reused
> at the next bulk (re)run. (Presumes same options in use, for
> example.)
> 
> But the ports that had running jails will be rebuilt from the
> start, not from an intermediate state.
> 
>> More generally, can a poudriere session be gracefully stopped,
>> say for maintenance work or to run a more urgent job, and then 
>> restarted without loss of intermediate work?
> 
> I've never tried a ^Z (to cause Suspended). My guess is that
> it would be disabled. If it was enabled, I doubt it would
> be propagated to the running jails. (Similar issue for a
> later fg.) Suspending and resuming a bunch of jails (that
> are not independent overall) in a coherent manor would
> likely be far from trivial. (Really kill -s STOP pid . . .
> and kill -s CONT pid . . . use implicitly.)
> 
> I also have never tried using nice or renice with poudriere.
> But this would seem more likely to work usefully, at least
> nice. (But nice does not do as much as you indicate that
> you want: the activity would just be at a lower priority
> for scheduling.)

Another thing that I've never tried: using cpuset
to set up a context that could later (temporarily
or permanently) limit which CPUs the poudriere
bulk's processes/threads run on.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)