Pantavisor Container Status
In this post, we are going to talk about how to make use of our status goal feature included in the Pantavisor 019 release.
To understand the concept behind status goal we have to first understand how container status works in Pantavisor.
After a Pantavisor-enabled board is booted up or updated, Pantavisor will try to start all containers from the revision. This process will not be immediate, and the container will have to traverse different stages, called status. These are the status a container can be at:
- INSTALLED: the container is installed and ready to go.
- MOUNTED: the container volumes are mounted, but not yet started.
- BLOCKED: any of the status goals from a container belonging to the previous group are not yet achieved. The concept of container groups will be explained on a different post, so it is only necessary to know that this status exists.
- STARTING: container is starting.
- STARTED: container PID is running.
- READY: Pantavisor has received a signal from the container.
- STOPPING: container is stopping because of an update transition.
- STOPPED: container has stopped.
Having this in mind, the status goal is the final status a container must reach. A configurable timeout will make updates fail if this objective is not achieved within the defined time. Currently, there are three configurable goals:
- MOUNTED: for containers whose volumes we want to be mounted but not started.
- STARTED: rest of containers that we want mounted and started, but we only check if its PID is running.
- READY: same as STARTED, but a READY signal coming from the container namespace is required.