Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Open Horizon should enable "run-to-completion" services

Overview

It is useful to be able to deploy containers that just run until they complete, not daemon-like containers that are expected to continue running forever. Open Horizon currently only supports the latter run-forever model so when you have a run-once application you need to wrap it with a process that goes idle after completion (i.e., something like: "while true: sleep"). Also you have to ensure that upon restart (e.g., due to reboot, or power cycle) that the container does not cause damage by trying to run again.

This issue is described in more detail in https://github.com/open-horizon/anax/issues/2458

Design

Bruce has suggested this would best be implemented as a service attribute of, "doNotRestart".

User Experience

This issue has come up in many contexts. A couple of examples are deploying the NVIDIA GPU Operator, and installing the EdgeX Foundry suite.

When integrating with applications, they sometimes use a run-once container instead of a setup script.  Sanjeev Gupta recently encountered this.  EdgeX Foundry also used to use this technique.

Command Line Interface

(none)

External Components

(none)

Affected Components

anax

Security

(none)

APIs

Likely there would be corresponding API changes.

Build, Install, Packaging

(none)

Documentation Notes

This new feature would have to be documented, of course.

Test

This new feature would have to be tested, of course.