Debugging Running Applications
How to access a running container?
To interact with a running container on a worker node, use the ctr
utility. This CLI tool is part of containerd
, the runtime Oakestra uses for deploying containers. All Oakestra containers are placed in a custom namespace called oakestra
.
In containerd
, there are two key concepts:
- Containers: Represent the filesystem, environment, and associated metadata.
- Tasks: Represent the processes running inside those containers.
Listing Containers and Tasks
To check all running tasks you can use the following:
Executing Commands Inside a Running Container
To attach to a running container and execute commands inside it:
For example, to use a shell inside the container x.y.z we can use
Where are the logfiles stored?
The stdout
and stderr
of each container or unikernel is stored under /tmp/<appname>.<appns>.<servicename>.<servicens>.<instancenumber>
of the worker node running the instance.
For example, to access the latest logs of instance 0 of
x.y.z.y
in my worker node I can runtail /tmp/x.y.z.y.0
What about Unikernels?
You cannot attach directly to a running unikernel, but their logs are stored in the same way as containers. Check the /tmp
directory structure as described above to access and review their logs.