jael, azimuth: reconfigure jael for L2

Jael needs to be reconfigured to listen to the new aagent for azimuth
events, and the old app needs to be shut down. We do this in
/app/azimuth's +on-init.

Additionally, we make sure that jael doesn't crash when it (as expected)
loses its subscription to the old agent.
This commit is contained in:
fang 2021-11-06 01:08:10 +01:00
parent 07d5ddfe0c
commit fecb809573
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972
2 changed files with 14 additions and 4 deletions

View File

@ -59,7 +59,10 @@
^- (quip card _this)
=. net.state %local
:_ this
[%pass /eth-watcher %agent [our.bowl %eth-watcher] %watch /logs/[dap.bowl]]~
:~ [%pass /eth-watcher %agent [our.bowl %eth-watcher] %watch /logs/[dap.bowl]]
[%pass /old-tracker %agent [our.bowl %azimuth-tracker] %poke %kiln-nuke !>([%azimuth-tracker %base])]
[%pass /lo %arvo %j %listen ~ [%| dap.bowl]]
==
::
++ on-save !>(state)
++ on-load

View File

@ -314,7 +314,7 @@
::
=. +>.$ (poke-watch hen %azimuth nod.own.pki)
=. +>.$
:: get everything from azimuth-tracker because jael subscriptions
:: get everything from /app/azimuth because jael subscriptions
:: seem to be flaky for now
::
?: &
@ -548,7 +548,7 @@
[%behn %wake *]
?^ error.hin
%- %+ slog
leaf+"jael unable to resubscribe, run :azimuth-tracker|listen"
leaf+"jael unable to resubscribe, run :azimuth|listen"
u.error.hin
+>.$
?> ?=([%breach @ ~] tea)
@ -565,7 +565,14 @@
[%gall %unto *]
?- +>-.hin
%raw-fact !!
%kick ~|([%jael-unexpected-quit tea hin] !!)
::
%kick
?> ?=([@ *] tea)
=* app i.tea
::NOTE we expect azimuth-tracker to be kill
?: =(%azimuth-tracker app) +>.$
~|([%jael-unexpected-quit tea hin] !!)
::
%poke-ack
?~ p.p.+>.hin
+>.$