Skip to content

Feature request for StopVM API #247

Closed
@haikuoliu

Description

@haikuoliu

Hi,

Currently the “StopVM” API does the following in order:

  1. Shutdown fc-agent
  2. Send a SIGTERM to VM
  3. Remove shim dir

Any of them could produce an error, the error message is good but the error type is not well defined, we don't know if the failure is from shim dir removal or stopping VM. To integrate with firecracker-containerd, we want to take different actions on different errors, if the error comes from removing shim dir, that's probably fine and we can continue, but if the VM itself is not stopped, we may want to trigger an alarm or something because it's a more critical failure. So is it possible for firecracker-containerd to define error type for "StopVM" API?

Also, reading from code, I see the SIGTERM is sent to VM to gracefully stop it, is it possible to set a timeout for SIGTERM, and SIGKILL (not sure if you are already doing it) will be sent by firecracker-containerd in case SIGTERM is not working?

Let me know if it makes sense.
Thanks,
Haikuo

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions