Want transaction/rollback support for installing sets of rules

Aperta
#549 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
networking

Direzione di ricerca

Inizia esaminando la versione precedente di #490 e il relativo flusso di inserimento della regola allow-cidr. Definisci la semantica delle transazioni e del rollback per gli ioctl con più regole e per i client esterni come omicron, incluso lo stato della transazione e la rimozione logica. Il lavoro è completo quando il design risolve le domande elencate relative all’API, al rollback e all’ambito futuro.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature

An earlier version of #490 manipulated allow-cidr logic by inserting an inbound and outbound rule in sequence. This introduced an error where failing to add the second rule would leave the first rule in place. The correct behaviour would have been to rollback to the original state and report an error.

For ioctls of similar scope (that wish to insert several rules, possibly across many tables), or control-plane operations which call several ioctls in sequence, it will be worthwhile to support rollback if any requested operation fails. Implementing this logic on an as-needed basis would be error-prone, repetitive, and make it easier to fail while rolling back.

This is an open design question, in that:

  • Scoping these internally within an individual ioctl would not be too difficult, and can be mostly hidden from API consumers.
  • In the general case however, we also need to handle the fact that external clients like omicron will inevitably want to perform a list of operations with rollback semantics. We'd need then to expose transaction start/end as ioctls, and think about how existing request bodies should carry transaction IDs or similar state.
  • The semantics of rule removal will likely need to change, at least while in a transaction context. Rules removed within a transaction need to be soft-removed, otherwise they may fail to be re-added on rollback.
  • Is there a point in future where we might want, e,.g., operations on layers to have similar functionality?
Lingua principale
Rust
Stelle
82
Fork
16
Merge medio
3g 6h
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di oxidecomputer/opte

Tutte le issue di oxidecomputer/opte

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.