Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: machine init is inconsistent about the names it puts in its DeviceMap #776

Open
gjcolombo opened this issue Oct 2, 2024 · 0 comments
Labels
server Related specifically to the Propolis server API and its VM management functions.

Comments

@gjcolombo
Copy link
Contributor

Observed while reading this code for other purposes.

struct MachineInitializer has a DeviceMap field into which it inserts the devices that will receive instance lifecycle notifications. These names are important in part because they are used as keys to associate components with each other during live migration. This means that the source and target must always agree on what gets put in the instance_name field of each migrate::Device that gets generated when a source serializes its device state.

Some MachineInitializer functions (e.g. initialize_uart) use the component names in the instance's spec as keys in the DeviceMap, but most of them (e.g. storage/network devices) generate a name from other properties of the component (e.g. its PCI BDF). The chosen names are derived from component properties like PCI BDFs that are kept stable across migrations, but it's still possible for the source and target to disagree on how these names should be derived, which breaks migration.

In a world where components an instance spec have strong unique identifiers (see #772) and where migration targets might get their device configurations from their sources, it seems like it would also be good to standardize on these IDs: the ID a component has in the spec is also the ID it uses when pairing payloads to components during a migration (with logging affordances to easily match IDs to logical devices if we're debugging a migration issue).

@gjcolombo gjcolombo added the server Related specifically to the Propolis server API and its VM management functions. label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Related specifically to the Propolis server API and its VM management functions.
Projects
None yet
Development

No branches or pull requests

1 participant