You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
gjcolombo
added
the
server
Related specifically to the Propolis server API and its VM management functions.
label
Oct 2, 2024
Observed while reading this code for other purposes.
struct MachineInitializer
has aDeviceMap
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 theinstance_name
field of eachmigrate::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 theDeviceMap
, 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).
The text was updated successfully, but these errors were encountered: