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

[Feature Request] Support changing the vsock CID on snapshot restore #3344

Open
3 tasks done
simonis opened this issue Dec 30, 2022 · 1 comment
Open
3 tasks done
Assignees
Labels
Priority: Medium Indicates than an issue or pull request should be resolved ahead of issues or pull requests labelled Status: Parked Indicates that an issues or pull request will be revisited later Type: Enhancement Indicates new feature requests

Comments

@simonis
Copy link
Contributor

simonis commented Dec 30, 2022

Feature Request

I'm aware of the vsock device limitations described in snapshot-support.md.

However there's no mentioning of how to support multiple clones of a snapshot with a configured vsock on the same host (they'll all share the same CID). For network interfaces, Network Connectivity for Clones describes pretty nicely how multiple clones can be run on the same host by using network namespaces. But to my knowledge, there's no network namespace support available for vsock sockets (I only found "vsock: support network namespace" which doesn't seem to have been finished yet).

I tried to configure a different vsock CID/path before restoring a snapshot, but in that case restoring fails with:

2022-12-30T20:46:38.507150111 [anonymous-instance:fc_api:ERROR:src/api_server/src/parsed_request.rs:190] Received Error. Status code: 400 Bad Request. Message: Loading a microVM snapshot not allowed after configuring boot-specific resources.

Describe the desired solution

The vsock man page mentions the following about "live migrations":

   Sockets are affected by live migration of virtual machines.
   Connected SOCK_STREAM sockets become disconnected when the
   virtual machine migrates to a new host.  Applications must
   reconnect when this happens.

   The local CID may change across live migration if the old CID is
   not available on the new host.  Bound sockets are automatically
   updated to the new CID.

I wonder if it wouldn't be possible to implement the vsock support in Firecracker such that the CID/socket path can be changed for a snapshot at restore time?

In addition to allowing multiple clones with configured vsockets, such a change would also make it possible to use the vsock device for obtaining a simple SysGenID (see #2546).

Please let me know if there's anything obvious that I'm missing?

Checks

  • Have you searched the Firecracker Issues database for similar requests?
  • Have you read all the existing relevant Firecracker documentation?
  • Have you read and understood Firecracker's core tenets?
@mattschlebusch mattschlebusch added the Priority: Medium Indicates than an issue or pull request should be resolved ahead of issues or pull requests labelled label Jan 31, 2023
@mattschlebusch
Copy link
Contributor

Hi @simonis,

Thanks for logging the request. This is something we will need to look into and seems reasonable at first glance.

As a side thought, you made mention of SysGenID which seems like a particularly specific application between guest<->host communication. I'm not sure what use-case you are working with more specifically, but using MMDS may be worth considering as well.

@JonathanWoollett-Light JonathanWoollett-Light added Type: Enhancement Indicates new feature requests and removed Feature: Snapshotting labels Mar 23, 2023
@ShadowCurse ShadowCurse added the Status: Parked Indicates that an issues or pull request will be revisited later label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Indicates than an issue or pull request should be resolved ahead of issues or pull requests labelled Status: Parked Indicates that an issues or pull request will be revisited later Type: Enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

5 participants