From c702eaadc57c67647239db258cf29b0801c6c794 Mon Sep 17 00:00:00 2001 From: Yongho Kim Date: Mon, 12 Feb 2024 13:15:33 -0600 Subject: [PATCH] Added a doc for plugin states --- docs/plugin_states.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docs/plugin_states.md diff --git a/docs/plugin_states.md b/docs/plugin_states.md new file mode 100644 index 0000000..3aa3f46 --- /dev/null +++ b/docs/plugin_states.md @@ -0,0 +1,16 @@ +# States of a Plugin over its lifecycle + + +An Edge aplication is selected by a job when submitted to the system. The application is then implemented with a wrapper called Plugin and runs on Waggle nodes. The Waggle scheduler records states of a Plugin over its lifecycle to inform users how the application runs. + +Plugin state changes based on events received from the Waggle edge scheduler and the backend Kubernetes cluster in Waggle node. The following table lists states of a Plugin along with description for each state. + +| State | Description | +| :--------: | :------- | +| inactive | The Plugin is recognized by the Waggle edge scheduler on a Waggle node. In this state, the scheduler constantly evaluates any associated Science rules to check if the Plugin needs to run to capture any event of interest. | +| queued | The Plugin has been triggered by its Science Rules and placed in the queue for execution. It will be dequeued by the scheduler as the required resource can be allocated by the system. | +| scheduled | The resource is allocated to the Plugin and associated container (i.e., a Kubernetes Pod) is created. This does not mean the Plugin actually runs its program, but indicates the creation of the program container. | +| initializing | The Plugin is being initialized. This initialzation includes container image pulling if not exist on the node, connecting the Plugin to the Waggle data pipeline, etc. | +| running | The Plugin program starts to run on designiated device. | +| completed | The Plugin program is terminated successfully, i.e. receiving return code 0 from the program container. | +| failed | The Plugin failed to reach to "completed" state. There are various reasons that a Plugin would end up with this state. For example, Plugin may fail to initialize and it will transition to this state with an error of the initialization. Or, Plugin code exited with non-zero return code. \ No newline at end of file