Skip to content

Routing computed fact still names routing as the cause for INSUFFICIENT_INFO and for an unexpected success (#460 follow-up) #481

Open

Description

@ARSH871-bot

Follow-up to #439 / #460, raised in my review of #460. Not blocking #460, which fixes the filter and missing-device cases correctly.

What's wrong. _routing_cause_clause() in ai/explain.py (on #460's branch) names a cause for two dispositions only, and gives every other disposition the same sentence, as a verified fact:

the network's current routing is what disagrees with that requirement, not the requirement itself

Two of those other cases are not supported by what Batfish reported.

1. INSUFFICIENT_INFO. Batfish uses this when it does not have enough of the model to decide where the flow goes. That is not a routing fault. The comment above _FILTER_DISPOSITIONS lists it with NO_ROUTE, NULL_ROUTED and LOOP as "really a routing/forwarding outcome".

Expected REACHABLE for a flow from 10.10.10.5 to 10.20.20.5, but traceroute ended in INSUFFICIENT_INFO
  -> "... the trace ended in INSUFFICIENT_INFO. ... the network's current routing is what disagrees with that requirement"

2. An unexpected success. When a flow the statement says must be blocked gets through, the same routing clause is used:

Expected UNREACHABLE for a flow from 10.10.10.5 to 10.20.20.5, but traceroute unexpectedly succeeded: ACCEPTED
  -> "... DOES reach 10.20.20.5 (ACCEPTED). ... the network's current routing is what disagrees with that requirement"

The usual cause of a flow getting through that should not is a missing or too-wide filter, not routing, and Batfish's traceroute does not tell us which. The same happens for DELIVERED_TO_SUBNET.

Both outputs were produced by calling _compute_routing_outcome() with routing._violation_detail(), the real producer, on main merged with #460's head 3f415ef.

Suggested. State only what was observed:

  • INSUFFICIENT_INFO: its own clause, e.g. "Batfish could not determine where this flow goes from the configs it has", with no cause claimed.
  • An unexpected success: a neutral clause, e.g. "the network currently lets this flow through", with no claim about whether routing or a filter is responsible.

Then pin each with a test against the real producer, as #460 does for the others.

Not in scope. NEIGHBOR_UNREACHABLE is arguably a layer-2 or missing-device case rather than routing. Worth a look while here, but I have not measured it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions