Skip to content

[Feature] Octavia load-balancer attribution #131

Description

@arasHi87

Description

Re-attribute Octavia LB traffic to the real end-user tenant instead of the service project. Two-segment model: tag Amphora MACs at cold-start (primary mechanism); optional bpf_skb_ct_lookup at the Amphora tap refines Segment-1 zone from the pre-NAT client IP.

Definition of Done (DoD)

  • amphora_meta sidecar map keyed by Amphora MACsuperseded. The marker is packed into the top bit of the existing mac_tenant_map value instead: a sidecar map costs ~20–30 ns per packet whose peer resolves, against a measured 82–110 ns budget, to carry one bit. A second map was still needed, but keyed differently — see the note below.
  • Octavia API client enumerates Amphorae at cold-start — and re-enumerates every reconcile pass. The join keys on the Amphora's compute_id, not its vrrp_port_id: Octavia plugs an Amphora into an off-subnet member's network by handing Nova a network with no port, and Nova then mints a port with no Octavia marker and no allowed-address pair (verified live). Any narrower join leaves that traffic billing the operator.
  • Two-tap asymmetry distinguishes Amphora vs backend tapsuperseded. Tap identity turned out to be the wrong discriminator: both segments cross the same taps. The Amphora's own address is what separates them — VIP means Segment 1, base address means Segment 2 — via a small tenant-scoped amphora_base_ip set, probed only when the marker bit is set.
  • Segment-2 → INFRA, attributed to LB owner — with one correction to the original model: attribution follows the VM whose tap saw the packet, never the peer. Peer-based attribution would put a server_id under a tenant_id that does not own it, breaking Contract 7's total → tenant → server → port nesting. In the ordinary topology the two coincide.

Technical Notes

Deferred (target deployments use the amphora provider only — verified). DESIGN §6 / Scenario F. OVN-native provider explicitly out of scope.

Story Points: 8 (Very High — extreme complexity or high uncertainty).

Output artifacts (Definition of Done)

Beyond code, docs, and config changes, completing this issue must also deliver:

  • Handbook knowledge update — land the durable, team-readable knowledge from this
    work into the bigstack-handbook cubecos kb (kb/cubecos/…) via
    /bigstack-core:save-to-handbook (Topic / Runbook / Known-issue / ADR as fits).

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions