The two-node bed's timeout report shows the node that did not answer, not always the second one
This commit is contained in:
@@ -150,12 +150,13 @@ async function settled(node: string, withinMs = 1_200_000): Promise<void> {
|
|||||||
last = said;
|
last = said;
|
||||||
await new Promise((r) => setTimeout(r, 5000));
|
await new Promise((r) => setTimeout(r, 5000));
|
||||||
}
|
}
|
||||||
// Timed out — capture what the node is actually doing so the failure is diagnosable.
|
// Timed out — capture what the node that did not answer is doing, so the failure is diagnosable.
|
||||||
const ps = (await on(NODE, `docker ps -a --format '{{.Names}}\t{{.Status}}'`)).out;
|
// Its own machine, not the second node's: the anchor timing out used to print the laptop's log.
|
||||||
const hostLog = (await on(NODE, `tail -80 /var/log/mesh-host.log`)).out;
|
const ps = (await on(node, `docker ps -a --format '{{.Names}}\t{{.Status}}'`)).out;
|
||||||
|
const hostLog = (await on(node, `tail -80 /var/log/mesh-host.log`)).out;
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`${node} never caught up within ${Math.round(withinMs / 1000)}s.\nLast status:\n${last}\n` +
|
`${node} never caught up within ${Math.round(withinMs / 1000)}s.\nLast status:\n${last}\n` +
|
||||||
`--- ${NODE} docker ps -a ---\n${ps}\n--- ${NODE} mesh-host.log tail ---\n${hostLog}`);
|
`--- ${node} docker ps -a ---\n${ps}\n--- ${node} mesh-host.log tail ---\n${hostLog}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user