From 68a80660b273a11f841caa65012b79ae293e57ad Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Fri, 27 Aug 2021 17:38:30 +0300 Subject: [PATCH] kiln: don't die so easily in +bump --- pkg/arvo/gen/hood/bump.hoon | 8 ++-- pkg/arvo/lib/hood/kiln.hoon | 81 ++++++++++++++++++++++--------------- pkg/arvo/sur/hood.hoon | 3 +- 3 files changed, 55 insertions(+), 37 deletions(-) diff --git a/pkg/arvo/gen/hood/bump.hoon b/pkg/arvo/gen/hood/bump.hoon index 7174466673..27d911b550 100644 --- a/pkg/arvo/gen/hood/bump.hoon +++ b/pkg/arvo/gen/hood/bump.hoon @@ -1,7 +1,7 @@ :- %say |= $: [now=@da eny=@uvJ bec=beak] - ~ ~ + ~ + check=_& + except=(set desk) == -:- %kiln-bump -~ - +[%kiln-bump except check] diff --git a/pkg/arvo/lib/hood/kiln.hoon b/pkg/arvo/lib/hood/kiln.hoon index 0f76a69e9c..354fa9a6be 100644 --- a/pkg/arvo/lib/hood/kiln.hoon +++ b/pkg/arvo/lib/hood/kiln.hoon @@ -341,8 +341,8 @@ |= lac=desk ^+ kiln ?: =(%base lac) - =/ mes "kiln: |uninstall: %base cannot be uninstalled" - (^emit (pyre:pass leaf/mes ~)) + =- (^emit (pyre:pass leaf/- ~)) + "kiln: |uninstall: %base cannot be uninstalled" ?. (~(has by ark) lac) ~> %slog.0^leaf/"kiln: |uninstall: {} not installed, ignoring" kiln @@ -380,8 +380,8 @@ ^+ vats =/ got (~(get by ark) lac) ?: =(%base lac) - =/ mes "kiln: suspend: %base cannot be suspended" - (emit (pyre:pass leaf/mes ~)) + =- (emit (pyre:pass leaf/- ~)) + "kiln: suspend: %base cannot be suspended" ?. (~(has by ark) lac) ~> %slog.0^leaf/"kiln: suspend: {} not installed, ignoring" vats @@ -416,34 +416,51 @@ :: Apply merges to revive faded agents on all paused desks. :: ++ bump - |= except=(set desk) + |= [except=(set desk) check=?] ^+ kiln - =/ kel=weft [%zuse zuse] - =/ ded (~(dif in (get-blockers kel)) (~(put in except) %base)) - ?. =(~ ded) - =/ mes "kiln: desks blocked upgrade to {<[- +]:kel>}: {}" - (^emit (pyre:pass leaf/mes ~)) - =/ liv (skip ~(tap in ~(key by ark)) ~(has in except)) - ~> %slog.0^leaf/"kiln: bump {}" - =< kiln - |- ^+ vats - ?~ liv vats - =. vats (abed i.liv) - :: skip to first commit at new kelvin + |^ ^+ kiln + ?. check + bump-all + =/ ded find-blocked + ?: =(~ ded) + bump-all + =- (^emit (pyre:pass leaf/- ~)) + "kiln: desks blocked upgrade to {}: {}" :: - =/ yon - =* nex next.rak - |- ^- (unit aeon) - ?~ nex ~ - ?: =(kel weft.i.nex) - `aeon.i.nex - $(nex t.nex) - ?~ yon - =/ mes "kiln: {here} killed upgrade to {<[- +]:kel>}" - (emit (pyre:pass leaf/mes ~)) - =. next.rak (crank-next u.yon) - =. vats (emit merge-main:pass) - $(liv t.liv) + ++ find-blocked + ^- (set desk) + (~(dif in (get-blockers zuse/zuse)) (~(put in except) %base)) + :: + ++ bump-all + =/ liv=(list desk) (skip ~(tap in ~(key by ark)) ~(has in except)) + ~> %slog.0^leaf/"kiln: bump {}" + |- ^+ kiln + ?~ liv kiln + $(liv t.liv, kiln (bump-one i.liv)) + :: + ++ bump-one + |= =desk + ^+ kiln + =< abet ^+ vats + =. vats (abed desk) + :: skip to first commit at new kelvin + :: + =/ yon + =* nex next.rak + |- ^- (unit aeon) + ?~ nex ~ + ?: =(kel weft.i.nex) + `aeon.i.nex + $(nex t.nex) + ?~ yon + ?. check + ~> %slog.0^leaf/"kiln: bump: ignoring {}" + vats + =- (emit (pyre:pass leaf/- ~)) + "kiln: {here} killed upgrade to {}" + =. next.rak (crank-next u.yon) + (emit merge-main:pass) + -- :: +stop-agents: internal helper to suspend agents on .loc :: :: Will not shut down %hood or %dojo. @@ -555,7 +572,7 @@ (update-running-apps (get-apps-diff our loc now rein.rak)) ?. =(%base loc) vats - =. kiln (bump (sy %base %kids ~)) + =. kiln (bump (sy %base %kids ~) check=|) (emit merge-kids:pass) :: ++ take-merge-kids @@ -683,7 +700,7 @@ (emit %pass way.commit-timer %arvo %b [%wait nex.commit-timer]) :: ++ poke-bump - |= except=(set desk) + |= [except=(set desk) check=?] abet:(bump:vats +<) :: ++ poke-cancel diff --git a/pkg/arvo/sur/hood.hoon b/pkg/arvo/sur/hood.hoon index df11949e1a..a8019692d8 100644 --- a/pkg/arvo/sur/hood.hoon +++ b/pkg/arvo/sur/hood.hoon @@ -63,7 +63,8 @@ :~ leaf/"/sys/kelvin: {<[lal num]:weft>}" leaf/"base hash: {?.(=(1 (lent meb)) <(head meb)>)}" leaf/"%cz hash: {}" - leaf/"remote aeon: {}" + leaf/"source ship: {}" + leaf/"source aeon: {}" leaf/"status: {sat}" leaf/"force on: {?:(=(~ add.rein.arak) "~" )}" leaf/"force off: {?:(=(~ sub.rein.arak) "~" )}"