Case for Runc

Added error handling for Runc, which does not work in cgroup v2.
Changed numbering of new errors.
This commit is contained in:
lunardunno 2025-03-22 16:07:35 +04:00
parent 106a1646b7
commit 2634af60a4
3 changed files with 5 additions and 1 deletions

View file

@ -467,6 +467,8 @@ ErrorCode ServerController::runContainerWorker(const ServerCredentials &credenti
return ErrorCode::ServerPortAlreadyAllocatedError;
if (stdOut.contains("is already in use by container"))
return ErrorCode::ServerPortAlreadyAllocatedError;
if (stdOut.contains("runc doesn't work on cgroups v2") )
return ErrorCode::ServerRuncNotWorkOnCgroupsV2;
if (stdOut.contains("cgroup mountpoint does not exist"))
return ErrorCode::ServerCgroupMountpointDoesNotExist;
if (stdOut.contains("invalid publish"))