Mem usage (WSS):
The easiest way to get the WSS of a Docker contaier is to ask Docker
using the "docker stats" command.
So I have docker_wrapper do this periodically (10 sec... it's a bit slow).
But how to get this back to the client?
Currently there's no provision for an app to reports its own WSS.
So I added one, by adding an optional field to the app status messages
sent from app to client in shared mem.
If this is present, the client uses it instead of procinfo.
CPU time: "docker stats" reports CPU fraction
(averaged over what period?)
We multiply that by the stats poll.
Not exactly the same as CPU time, but close enough.
- New philosophy: always query the presence of software (WSL distros, Docker)
even if client config doesn't allow its use.
Send the config info to scheduler, and enforce it there.
- New philosophy: allow running jobs in any WSL distro
except those disallowed in the config
- Add plan class support for WSL and Docker app versions
- client: query the libc version of WSL distros.
The plan class entry for a WSL app version
can specify a min libc version.
- wsl_wrapper: add --min_libc_version cmdline arg
(should match plan class spec)
Notes:
encoding version numbers into integers (e.g. 2.27 -> 227) was a bad idea.
We should just store them as strings,
and define a VERSION_NUM class for parsing and comparing them.
Too late now, I guess
and report it in scheduler requests.
Note: the Linux client should report its libc version to the scheduler
in a separate field, rather than encoding it in the OS version string
(still query the presence of docker, and report it in sched requests).
scheduler: parse the above
docker_wrapper: use either docker or podman, depending on what's there
(on the host (Unix) or in a WSL distro (Win))
Either or both could be present on both Linux and Win/WSL.
If both, use podman.
Do this separately for engine and compose;
a host could have the podman engine but Docker compose.
data structures:
old: (in both HOSTINFO and WSL_DISTRO):
bool is_docker_available: it's present, AND allowed by config
string docker_version
... and same for docker_compose
new:
string docker_version: empty if not present
DOCKER_TYPE docker_version_type (DOCKER or PODMAN)
We send this in sched requests even if Docker disallowed by prefs
(send that flag separately).
This way projects can know what software a host has,
even if they can't use it.
(Should use this approach with VBox too)