Do `Lifecycle::{pause,resume}` need to be fallbile?

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
backend

調査の方向性

Start by reading the Lifecycle trait and its implementations, especially PciVirtioViona and PciVirtioVsock, where fallible calls are mentioned. Audit those calls and determine which can fail and how their errors should be handled; done means the implementations have a consistent, decided approach to reporting or propagating failures.

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

説明

We're putting together a prototype of Propolis that transfers OPTE's dynamic state like flow-tables during a migration. I naively called out to the OPTE methods for pausing and resuming inside the impl Lifecycle for PciVirtioViona, but realized that these methods are infallible, while the OPTE methods return an error. It's not clear what to do with that error. We could ignore it, panic, or return it (changing the trait method).

There are actually other places where we currently ignore a fallible call inside Lifecycle methods, e.g., for PciVirtioViona and PciVirtioVsock. That naively seems like the worst option, since we continue operating in an indeterminate state. Panicking seems better, but also forecloses on the opportunity to tell upstack software like Omicron what went wrong. Returning an error seems like a good choice too, but has drawbacks. It's not really clear that any of the failures even can happen in practice, in which case the error is more misleading than helpful. It's also not clear what to do when we hit one, since it might not really be possible to recover. But I do still think at least reporting the error, even if we then panic, is an improvement.

In any case, we should probably audit the Lifecycle implementations to see which are actually fallible and decide what to do with those errors.

主要言語
Rust
スター
326
フォーク
49
平均マージ
1日 13時間
マージ済み PR(30日)
10

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

oxidecomputer/propolis のほかの issue

oxidecomputer/propolis の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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