oxidecomputer / oxidecomputer/opte

Want DTrace probes for individual predicate matches

Open
#254 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
77
Forks
11
Avg merge
9d 20h
Merged PRs (30d)
8

Description

While getting ICMPv6 support off the ground, I spent a long time figuring out why a rule failed to match. Turns out I had the used wrong destination MAC address for OPTE in the guest: a8:40:25:f7:77:77 instead of the correct a8:40:25:ff:77:77. I used the opte-rule-match.d D script to verify that the rule indeed failed to match, but it would be extremely valuable to see exactly how each predicate in the rule matches (or not) against the data provided for it.

The real problem here was that the rule-match probe takes the FlowId and stringifies it, which includes the IP protocol, and source/destination IP addresses and ports, while the actual predicate that failed to match was on the destination MAC address. A probe named something like predicate-match would be very helpful, and could include the predicate kind; the data it was provided; the data it expected to find; and the boolean indicating whether it matched.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing opte-rule-match.d D script and the rule-match probe it uses. Trace how predicate evaluation data is exposed, then make the requested predicate-level information available: predicate kind, provided data, expected data, and whether it matched; done means the probe can explain the destination-MAC mismatch described here.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.