Fleet: the last two process patterns (a top-level alternation; the canary's node path by its basename)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
679cc69d71
commit
d822e5cf64
2 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ def log(s, page=False):
|
|||
line = f"{now()} {s}"; open(LOG, "a").write(line + "\n"); print(line, flush=True)
|
||||
if page: subprocess.run([sys.executable, os.path.join(fleet.HERE, "page.py"), "log", s])
|
||||
def probe(b):
|
||||
rc, out, err = fleet.ssh(b, "tail -1 /root/fleet/setup.log 2>/dev/null | grep -o '^RESULT setup_[a-z]*'; grep -c . /root/fleet/out/matrix.log 2>/dev/null; grep -o '^RESULT matrix_[a-z]*' /root/fleet/out/matrix.log 2>/dev/null | tail -1; grep -c . /root/fleet/out/ember.log 2>/dev/null; grep -o '^RESULT ember_done' /root/fleet/out/ember.log 2>/dev/null | tail -1; pgrep -c -f '([b]ash in/box-|[p]ython3 -u /root/fleet/in/box-prover)'; grep -E '^RESULT (point|miner|step|choice|claim|submitted|paid|segment_refused|seg [0-9]+ (chain|shards))' /root/fleet/out/matrix.log /root/fleet/out/ember.log /root/fleet/out/prover.log 2>/dev/null | tail -1 | cut -c1-200", timeout=40)
|
||||
rc, out, err = fleet.ssh(b, "tail -1 /root/fleet/setup.log 2>/dev/null | grep -o '^RESULT setup_[a-z]*'; grep -c . /root/fleet/out/matrix.log 2>/dev/null; grep -o '^RESULT matrix_[a-z]*' /root/fleet/out/matrix.log 2>/dev/null | tail -1; grep -c . /root/fleet/out/ember.log 2>/dev/null; grep -o '^RESULT ember_done' /root/fleet/out/ember.log 2>/dev/null | tail -1; pgrep -c -f '[b]ash in/box-|[p]ython3 -u /root/fleet/in/box-prover'; grep -E '^RESULT (point|miner|step|choice|claim|submitted|paid|segment_refused|seg [0-9]+ (chain|shards))' /root/fleet/out/matrix.log /root/fleet/out/ember.log /root/fleet/out/prover.log 2>/dev/null | tail -1 | cut -c1-200", timeout=40)
|
||||
if rc != 0 and not out.strip(): return None
|
||||
l = out.split("\n")
|
||||
g = lambda i: l[i].strip() if i < len(l) else ""
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ def hubsplit(): return hub.run("echo total=$(grep -c 'wrong block version' /root
|
|||
print(st(), "hub before:", hubsplit(), flush=True)
|
||||
for box, l, peers in ((A, "p2-4090-3", "--addpeer=213.173.107.74:16516 --addpeer=188.245.5.161:26611 --addpeer=213.173.98.36:18451"), (B, "p2-3090-2", "--addpeer=213.173.107.74:16516 --addpeer=188.245.5.161:26611")):
|
||||
path=box.install_payload(NODE, SHA); box.put([MINER], "/root/fleet/in/igneum-miner-new"); iid,r=Registry.find(l)
|
||||
already = "ALREADY=yes" in box.run(f"pgrep -f '[{path[0]}]{path[1:]} --devnet --appdir=' >/dev/null && echo ALREADY=yes || echo ALREADY=no", 20)[1] # a marker: the Vast proxy prints a banner on stdout # the node already runs this binary (a relaunch): keep its datadir and sync
|
||||
already = "ALREADY=yes" in box.run(f"pgrep -f '[/]root/fleet/in/{os.path.basename(path)} --devnet --appdir=' >/dev/null && echo ALREADY=yes || echo ALREADY=no", 20)[1] # a marker: the Vast proxy prints a banner on stdout # the node already runs this binary (a relaunch): keep its datadir and sync
|
||||
if already: print(st(), l, "already on the binary, keeping its sync", flush=True)
|
||||
rc,out,err=(0,"kept","") if already else box.run(f"cd /root/fleet && {KILL}; [ -d node ] && mv node node.pre-$(date -u +%H%M); mkdir -p node; mv node.log node.pre-$(date -u +%H%M).log 2>/dev/null; cp in/igneum-miner-new /opt/igneum/pkg/bin/igneum-miner.new && chmod +x /opt/igneum/pkg/bin/igneum-miner.new && mv /opt/igneum/pkg/bin/igneum-miner.new /opt/igneum/pkg/bin/igneum-miner; echo {path} > standing.node; IGNEUM_PROOF_VERIFIER=/opt/igneum-floor/bin/igneum-prove-host setsid nohup {path} --devnet --appdir=/root/fleet/node --rpclisten=0.0.0.0:26610 --evm-rpclisten=127.0.0.1:26790 --listen=0.0.0.0:26611 {peers} --override-params-file=/root/fleet/override.json --nodnsseed --disable-upnp --nologfiles --yes </dev/null >> node.log 2>&1 & echo started T0=$(date -u +%T)", 90)
|
||||
print(st(), l, out.replace("\n"," "), flush=True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue