Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,12 @@ function connectivityCheck(
}
if (!isRecordArray(routeValue) || routeValue.length !== 1) return failed("route");
const route = routeValue[0]!;
const routeSource = route.prefsrc ?? route.src;
// `ip -j route get <peer> from <src> oif <dev>` echoes the source back as the
// `from` field on iproute2 6.1.0 (DGX Spark / DGX OS 7.5.0) instead of
// `prefsrc`/`src`, so the source must be read from `from` too or the route
// check fails on every healthy cluster (#8684; same field-shape class as the
// neighbor `dev`-omission fix in #8519/#8527).
const routeSource = route.prefsrc ?? route.src ?? route.from;
if (
route.dev !== request.netdev ||
routeSource !== request.sourceAddress ||
Expand Down
57 changes: 54 additions & 3 deletions src/lib/inference/serving/managed-cluster-discovery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,11 @@ function connectivityTransport(
execute: (argv) => {
const routeResponse = () => ({
status: 0,
stdout: JSON.stringify([{ dev: argv.at(-1), prefsrc: argv[6], scope: "link" }]),
// Real iproute2 6.1.0 output for `route get <peer> from <src> oif <dev>`
// echoes the source as `from` (no `prefsrc`/`scope`) — see #8684.
stdout: JSON.stringify([
{ dst: argv[4], from: argv[6], dev: argv.at(-1), flags: [], uid: 1000, cache: [] },
]),
stderr: "",
});
const pingResponse = () => ({
Expand Down Expand Up @@ -920,9 +924,12 @@ describe("production pinned peer transport", () => {
status: 0,
stdout: JSON.stringify([
{
dst: argv[4],
from: argv[6],
dev: argv.at(-1),
prefsrc: argv[6],
scope: "link",
flags: [],
uid: 1000,
cache: [],
...(routedThroughGateway ? { gateway: "192.168.100.254" } : {}),
},
]),
Expand Down Expand Up @@ -961,6 +968,50 @@ describe("production pinned peer transport", () => {
});
});

it("accepts the route source when iproute2 6.1.0 echoes it as `from` on a healthy cluster (#8684)", () => {
const deps = createManagedClusterDiscoveryDeps(() => ({ status: 0, stdout: "", stderr: "" }));
const requests = connectivityRequests();
// Real DGX Spark output (iproute2 6.1.0, DGX OS 7.5.0): `route get <peer>
// from <src> oif <dev>` reports the source as `from`, with no
// `prefsrc`/`src`/`scope`. Before #8684 the route check read only
// `prefsrc ?? src`, so it rejected every healthy dual-Spark rail.
const transport: ManagedClusterReadOnlyHostTransport = {
execute: (argv) => {
const routeResponse = () => ({
status: 0,
stdout: JSON.stringify([
{ dst: argv[4], from: argv[6], dev: argv.at(-1), flags: [], uid: 1000, cache: [] },
]),
stderr: "",
});
const neighborResponse = () => {
const request = requests.find(({ peerAddress }) => peerAddress === argv[5])!;
return {
status: 0,
stdout: JSON.stringify([
{
dst: request.peerAddress,
dev: request.netdev,
lladdr: request.expectedPeerMac,
state: ["REACHABLE"],
},
]),
stderr: "",
};
};
return argv[1] === "-j" && argv[2] === "route"
? routeResponse()
: argv[0] === "ping"
? { status: 0, stdout: "", stderr: "" }
: neighborResponse();
},
readFile: () => "",
readdir: () => [],
};

expect(deps.probeConnectivity(transport, requests)).toBeNull();
});

it("accepts a neighbor entry that omits the dev key filtered out by ip (#8519)", () => {
const deps = createManagedClusterDiscoveryDeps(() => ({ status: 0, stdout: "", stderr: "" }));
const requests = connectivityRequests();
Expand Down
Loading