oxidecomputer / oxidecomputer/dendrite
Uplinkd should probably go away
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 20
- Forks
- 3
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 4
Description
Uplinkd in its own words:
// This is a very limited function daemon. It watches the smf database, looking
// for entries in the uplinks/* property group. Each entry contains a tofino
// link name and one or more addresses. For each link that has a corresponding
// tfport interface, the daemon ensures that each of those addresses exists on
// the interface, and cleans up any addresses on the interface that aren't
// listed in the property.
//
// Interfaces on the system that don't have corresponding smf properties are
// left untouched. Entries in the database that don't have corresponding
// illumos interfaces are ignored - this daemon does not create or destroy
// interfaces.
//
// TODO: there is a gap at startup time. If the daemon crashes, when we restart
// we won't know which addresses are managed and which aren't. This is only a
// problem if the configured population changes between crashing and restarting.
//
// TODO: currently setting an interface into PtP mode seems to screw it up
// somehow. Even after removing that address, you can't add a new address to
// it. Maybe there is a way to reset an interface to broadcast mode after
// deleting its point-to-point link(s)?
This is sort of an odd daemon. It looks at SMF properties to set addresses for uplink interfaces rather than providing a dropshot server for configuration. This is redundant information from the PortConfig in RackNetworkConfig that already gets plumbed to dpd. Dpd could easily perform these operations directly without having to parse SMF properties to learn the existing configuration. This would also prevent the bugs from the doc comment above, as reconcilliation in dpd wouldn't rely on smf refresh.
There is also additional parsing and reconciliation in the uplinkd_reconciler in omicron that would go away in this case. port_settings_apply would drive everything and this would go away.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the uplinkd implementation and the uplinkd_reconciler in omicron, then trace how PortConfig from RackNetworkConfig reaches dpd and port_settings_apply. Confirm the redundant SMF parsing and reconciliation paths before changing anything. Done means uplinkd and its redundant reconciliation are removed while dpd handles the uplink address operations directly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100