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

Abierto
#1,251 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
326
Forks
49
Merge medio
1 d 13 h
PR fusionados (30 d)
10

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de oxidecomputer/propolis

Todos los issues de oxidecomputer/propolis

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.