[live-migration] disable log listener for migratable UVMs#2715
Conversation
1f015af to
a570878
Compare
|
When enabled, this option changes how the sandbox is initialized to avoid starting a log listener and to skip the /bin/vsockexec wrapper in the kernel arguments, which is necessary for live migration scenarios
|
| // LiveMigrationAllowed is a sandbox-scoped gate indicating that the sandbox is | ||
| // intended to be live-migratable. When true, the platform log listener will | ||
| // not be initialized. | ||
| LiveMigrationAllowed bool |
There was a problem hiding this comment.
I dont like the word "allowed" here. What we are trying to say is "enforce migration support". I'm not sure I have a great word either, but "allowed" is like a policy. And we are trying to limit a feature set here so that we can maintain migratability. I wonder if we should call this "LiveMigrationSupportEnabled" or "LiveMigrationFeatureSetEnabled" or something like that.
a570878 to
dc14d71
Compare
Introduces a sandbox-scoped LiveMigrationAllowed flag (parsed from the LiveMigrationAllowed annotation) that propagates from the LCOW sandbox options through spec building, kernel-args construction, and the host-side VM controller. When a sandbox opts into live migration, the builder validates and locks the allow-listed UVM-shape annotations up front so the GCS init command is emitted without the /bin/vsockexec wrapper since the host will not run a log listener that is non-migratable. Correspondingly, the controller short-circuits its GCS log listener setup for live-migratable pods, closing logOutputDone so the boot path proceeds cleanly without a host-side log socket. Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
dc14d71 to
b69c2ba
Compare
Summary
This pull request adds support for live-migratable Linux containers on Windows (LCOW) sandboxes by introducing a new
LiveMigrationAllowedoption. When enabled, this option changes how the sandbox is initialized to avoid starting a log listener and to skip the/bin/vsockexecwrapper in the kernel arguments, which is necessary for live migration scenarios. The changes include updates to the configuration, kernel argument construction, and test coverage to ensure correct behavior.Live migration support and configuration:
LiveMigrationAllowedfield toSandboxOptionsand parse it from theio.microsoft.migration.allowedannotation, allowing sandboxes to be marked as live-migratable.buildKernelArgs,buildInitArgs, andbuildGCSCommandto thread theliveMigrationAllowedflag through and alter command-line construction accordingly. When enabled, the/bin/vsockexecwrapper is omitted to prevent stalling during migration.Controller and runtime behavior:
Testing and validation:
specs_test.goto verify correct parsing, kernel argument construction, and runtime behavior for both enabled and disabled live migration scenarios, including edge cases.