Skip to content

Implement simple device manager #3

@sz-po

Description

@sz-po

The goal of this task is to develop a solution that can initiate device processes, monitor their status, and terminate them as required. The device manager should have the following capabilities:

  • Importing device specifications from the structure
  • Starting the device process
  • Detecting the process's end and restarting it if the exit-code is other than 0. If the error persists, an exponential backoff should be implemented.
  • Triggering the end of the process by sending SIGTERM, waiting for a grace period, and then sending SIGKILL.

Furthermore, the structure describing the process should have a field that allows its value (also a structure) to be transferred as the device configuration. The configuration structure is unknown during compilation but should be passed as environment variables to the device process, prefixed with DKVMS_DEVICE_CONFIG_. For instance, the structure shown below expressed in YAML format:

display:
   id: foo

should be encoded as DKVMS_DEVICE_CONFIG_DISPLAY_ID.

Please ensure that appropriate information on how this mechanism works is provided in the readme.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationfeatureNew feature or requestkernelThis issue is related to kernel.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions