Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

oxlog: stop listing /var/dendrite as an extra log directory

Open Beginner friendly
#11,390 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
tooling

Research direction

Start in dev-tools/oxlog/src/lib.rs at Zones::load and trace ExtraLogDir::Dendrite and the switch zone's extra log directory. Remove the obsolete directory entry, then run the relevant oxlog checks or tests and confirm that oxlog logs oxz_switch --extra no longer lists zlog-cfg-cur.

Written by the indexing model from the issue text.

Description

oxlog lists /zone/oxz_switch/root/var/dendrite as an "extra" log directory for the dendrite service (Zones::load in dev-tools/oxlog/src/lib.rs), but on current systems it holds no logs.

What's in the directory

dpd's start method (svc-dpd in dendrite) runs dpd from /var/dendrite after copying misc/zlog-cfg there as zlog-cfg-cur. That zlog configuration sends the Tofino SDE's driver logging to bf_drivers.log ("bf_drivers.log", 5M * 5), in dpd's working directory.

However, dpd now sends the SDE's log messages to its own structured log instead. In dendrite, asic/src/tofino_asic/sde_log.rs defines bf_sys_log_callback ("an FFI-compatible routine that the SDE's C code can call when it has a message to be logged"), and asic/src/tofino_asic/mod.rs installs it with a logger tagged "unit" => "bf-sde".

What we see on rack2 (switch zone on BRM42220014)
  • dpd runs with /var/dendrite as its working directory. The directory contains only zlog-cfg-cur, and dpd has no files open in it.
  • No bf_drivers.log* exists anywhere in the switch zone.
  • SDE messages appear in dpd's SMF log, oxide-dendrite:default.log, e.g. {"msg":"QSFP 62 : FLAG_RX_LOS change (0x0 -> 0xf)", …, "unit":"bf-sde","module":"Pltfm"}.
  • An archived dpd log from an older boot (file mtime March 2024) contains zlog-formatted SDE lines on stdout, e.g. 1986-12-28 00:01:16.244179 BF_PLTFM ERROR - QSFP 1 : …. The current boot's log has none, so SDE logging appears to have moved from zlog to dpd's callback at some point.

Since the SDE's logs now live in oxide-dendrite:default.log, oxlog already reports them as the dendrite service's SMF logs, including in support bundles.

Proposal
  • Remove ExtraLogDir::Dendrite, and the switch zone's extra log directory, from oxlog.
  • This changes the output of oxlog logs oxz_switch --extra: it would no longer list zlog-cfg-cur. Support bundles don't collect that file today anyway: sled-diagnostics' extra-log parser skips it, because it isn't named like a log file.
Open questions
  • Is there any configuration or platform (e.g. softnpu, or a lab setup) where dpd still writes bf_drivers.log to /var/dendrite? If so, the directory should stay, and it would need a naming rule for zlog's rotated files.
  • For the dendrite owners: does svc-dpd still need to copy zlog-cfg into /var/dendrite, now that SDE logging goes through bf_sys_log_callback? (Outside omicron; just flagging it.)

Found while working on #11372.

Dominant language
Rust
Stars
610
Forks
104
Avg merge
2d 16h
Merged PRs (30d)
120

Getting set up

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.

More from oxidecomputer/omicron

All issues in oxidecomputer/omicron

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.