Want transaction/rollback support for installing sets of rules

オープン
#549 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
rust
領域
networking

調査の方向性

まず #490 の以前のバージョンと、その allow-cidr ルール挿入フローを確認します。複数ルールの ioctl と omicron などの外部クライアントについて、トランザクション状態と論理削除を含む、トランザクションおよびロールバックのセマンティクスを定義します。完了とは、設計によって列挙された API、ロールバック、将来のスコープに関する質問が解決されていることを意味します。

索引モデルが issue の本文から書いたものです。

説明

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?
主要言語
Rust
スター
82
フォーク
16
平均マージ
3日 6時間
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

oxidecomputer/opte のほかの issue

oxidecomputer/opte の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。