From ac072729c27c3ef1e6d39198217cce2bf2822ddf Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Mon, 15 Aug 2022 17:54:17 +0300 Subject: [PATCH 1/4] gall: force load %hood and %dojo on poke --- pkg/arvo/sys/vane/gall.hoon | 38 +++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/pkg/arvo/sys/vane/gall.hoon b/pkg/arvo/sys/vane/gall.hoon index 3ea10d64ae..35cfc382f7 100644 --- a/pkg/arvo/sys/vane/gall.hoon +++ b/pkg/arvo/sys/vane/gall.hoon @@ -917,19 +917,33 @@ =/ running (~(get by yokes.state) agent) =/ is-running ?~(running %| ?=(%& -.agent.u.running)) =/ is-blocked (~(has by blocked.state) agent) + :: agent is running; deliver move normally :: - ?: |(!is-running is-blocked) - =/ blocked=(qeu blocked-move) - =/ waiting (~(get by blocked.state) agent) - =/ deals (fall waiting *(qeu blocked-move)) - =/ deal [hen routes &+deal] - (~(put to deals) deal) - :: - %- (slog leaf+"gall: not running {} yet, got {<-.deal>}" ~) - %_ mo-core - blocked.state (~(put by blocked.state) agent blocked) - == - (mo-apply agent routes deal) + ?. |(!is-running is-blocked) + (mo-apply agent routes deal) + :: %hood or %dojo must run; wake them up + :: + ?: ?=(?(%hood %dojo) agent-name) + ~> %slog.2^leaf/"gall: force load {}" + =/ bek=beak [our q.beak.yoke da+now] + =/ rag (mo-scry-agent-cage agent-name q.bek da+now) + ?: ?=(%| -.rag) + ~> %slog.2^leaf/"gall: force load {} failed" + (mean p.rag) + =. mo-core (mo-receive-core:cor dap bek p.rag) + ~> %slog.2^leaf/"gall: force load {} succeeded" + (mo-apply agent routes deal) + :: + =/ blocked=(qeu blocked-move) + =/ waiting (~(get by blocked.state) agent) + =/ deals (fall waiting *(qeu blocked-move)) + =/ deal [hen routes &+deal] + (~(put to deals) deal) + :: + %- (slog leaf+"gall: not running {} yet, got {<-.deal>}" ~) + %_ mo-core + blocked.state (~(put by blocked.state) agent blocked) + == :: +mo-handle-ames-request: handle %ames request message. :: ++ mo-handle-ames-request From a70c2ffe1adb9dbff4fb6dfb73dc969664d684a2 Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Mon, 15 Aug 2022 21:22:12 +0300 Subject: [PATCH 2/4] gall: now restarts %hood, but not %dojo yet --- pkg/arvo/sys/vane/gall.hoon | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/arvo/sys/vane/gall.hoon b/pkg/arvo/sys/vane/gall.hoon index 35cfc382f7..9c896940f3 100644 --- a/pkg/arvo/sys/vane/gall.hoon +++ b/pkg/arvo/sys/vane/gall.hoon @@ -923,15 +923,15 @@ (mo-apply agent routes deal) :: %hood or %dojo must run; wake them up :: - ?: ?=(?(%hood %dojo) agent-name) - ~> %slog.2^leaf/"gall: force load {}" - =/ bek=beak [our q.beak.yoke da+now] - =/ rag (mo-scry-agent-cage agent-name q.bek da+now) + ?: ?=(?(%hood %dojo) agent) + ~> %slog.2^leaf/"gall: force load {}" + =/ bek=beak [our %base da+now] + =/ rag (mo-scry-agent-cage agent q.bek da+now) ?: ?=(%| -.rag) - ~> %slog.2^leaf/"gall: force load {} failed" + ~> %slog.2^leaf/"gall: force load {} failed" (mean p.rag) - =. mo-core (mo-receive-core:cor dap bek p.rag) - ~> %slog.2^leaf/"gall: force load {} succeeded" + =. mo-core (mo-receive-core agent bek p.rag) + ~> %slog.2^leaf/"gall: force load {} succeeded" (mo-apply agent routes deal) :: =/ blocked=(qeu blocked-move) From 95580f7e838794139d58ca25c3269d9cb703b1f4 Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Tue, 16 Aug 2022 00:38:42 +0300 Subject: [PATCH 3/4] gall: revive %hood and %dojo on poke --- pkg/arvo/sys/vane/gall.hoon | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/pkg/arvo/sys/vane/gall.hoon b/pkg/arvo/sys/vane/gall.hoon index 9c896940f3..eef8cf0730 100644 --- a/pkg/arvo/sys/vane/gall.hoon +++ b/pkg/arvo/sys/vane/gall.hoon @@ -921,18 +921,26 @@ :: ?. |(!is-running is-blocked) (mo-apply agent routes deal) - :: %hood or %dojo must run; wake them up + :: if agent must be running, revive all needed agents and apply :: ?: ?=(?(%hood %dojo) agent) - ~> %slog.2^leaf/"gall: force load {}" - =/ bek=beak [our %base da+now] - =/ rag (mo-scry-agent-cage agent q.bek da+now) - ?: ?=(%| -.rag) - ~> %slog.2^leaf/"gall: force load {} failed" - (mean p.rag) - =. mo-core (mo-receive-core agent bek p.rag) - ~> %slog.2^leaf/"gall: force load {} succeeded" - (mo-apply agent routes deal) + |^ ^+ mo-core + =. mo-core (force-install %hood) + =. mo-core (force-install %dojo) + (mo-apply agent routes deal) + :: + ++ force-install + |= dap=dude + ^+ mo-core + ~> %slog.2^leaf/"gall: force load {}" + ~< %slog.2^leaf/"gall: force load {} succeeded" + =/ bek=beak [our %base da+now] + =/ rag (mo-scry-agent-cage dap q.bek da+now) + ?: ?=(%| -.rag) + ~> %slog.2^leaf/"gall: force load {} failed" + (mean p.rag) + (mo-receive-core dap bek p.rag) + -- :: =/ blocked=(qeu blocked-move) =/ waiting (~(get by blocked.state) agent) From c972c0fbe2847192fcb66358f52f718686dbead0 Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Tue, 16 Aug 2022 01:37:35 +0300 Subject: [PATCH 4/4] gall: roundtrip through arvo to revive %hood and %dojo --- pkg/arvo/sys/vane/gall.hoon | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/pkg/arvo/sys/vane/gall.hoon b/pkg/arvo/sys/vane/gall.hoon index eef8cf0730..548c836113 100644 --- a/pkg/arvo/sys/vane/gall.hoon +++ b/pkg/arvo/sys/vane/gall.hoon @@ -288,8 +288,9 @@ ++ mo-core . ++ mo-abed |=(hun=duct mo-core(hen hun)) ++ mo-abet [(flop moves) gall-payload] - ++ mo-pass |=(p=[wire note-arvo] mo-core(moves [[hen pass+p] moves])) ++ mo-give |=(g=gift mo-core(moves [[hen give+g] moves])) + ++ mo-pass |=(p=[wire note-arvo] mo-core(moves [[hen pass+p] moves])) + ++ mo-slip |=(p=note-arvo mo-core(moves [[hen slip+p] moves])) ++ mo-past |= =(list [wire note-arvo]) ?~ list @@ -741,6 +742,15 @@ ?. =(nonce.u.yoke i.t.wire) %- (slog leaf+"gall: got old {<+<.sign-arvo>} for {}" ~) mo-core + :: if agent must be running, revive all needed agents then apply + :: + ?: ?& ?=(%| -.agent.u.yoke) + ?=(?(%dojo %hood) dap) + == + =. mo-core (mo-pass /nowhere %g %jolt %base %hood) + =. mo-core (mo-pass /nowhere %g %jolt %base %dojo) + (mo-pass use+wire %b %huck sign-arvo) + :: ?. ?=([?(%gall %behn) %unto *] sign-arvo) ?: ?=(%| -.agent.u.yoke) %- (slog leaf+"gall: {} dozing, dropping {<+<.sign-arvo>}" ~) @@ -921,26 +931,12 @@ :: ?. |(!is-running is-blocked) (mo-apply agent routes deal) - :: if agent must be running, revive all needed agents and apply + :: if agent must be running, revive all needed agents then apply :: ?: ?=(?(%hood %dojo) agent) - |^ ^+ mo-core - =. mo-core (force-install %hood) - =. mo-core (force-install %dojo) - (mo-apply agent routes deal) - :: - ++ force-install - |= dap=dude - ^+ mo-core - ~> %slog.2^leaf/"gall: force load {}" - ~< %slog.2^leaf/"gall: force load {} succeeded" - =/ bek=beak [our %base da+now] - =/ rag (mo-scry-agent-cage dap q.bek da+now) - ?: ?=(%| -.rag) - ~> %slog.2^leaf/"gall: force load {} failed" - (mean p.rag) - (mo-receive-core dap bek p.rag) - -- + =. mo-core (mo-pass /nowhere %g %jolt %base %hood) + =. mo-core (mo-pass /nowhere %g %jolt %base %dojo) + (mo-slip %g %deal [ship our] agent deal) :: =/ blocked=(qeu blocked-move) =/ waiting (~(get by blocked.state) agent)