Another place to handle the error 211

Another place to handle the error: ServerRuncNotWorkOnCgroupsV2
This commit is contained in:
lunardunno 2025-03-22 19:29:04 +04:00 committed by GitHub
parent 012260c473
commit a517041084
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -439,15 +439,20 @@ ErrorCode ServerController::buildContainerWorker(const ServerCredentials &creden
stdOut += data + "\n";
return ErrorCode::NoError;
};
auto cbReadStdErr = [&](const QString &data, libssh::Client &) {
stdOut += data + "\n";
return ErrorCode::NoError;
};
errorCode =
errorCode error =
runScript(credentials,
replaceVars(amnezia::scriptData(SharedScriptType::build_container), genVarsForScript(credentials, container, config)),
cbReadStdOut);
if (errorCode)
return errorCode;
cbReadStdOut, cbReadStdErr);
if (stdOut.contains("runc doesn't work on cgroups v2") )
return ErrorCode::ServerRuncNotWorkOnCgroupsV2;
return errorCode;
return error;
}
ErrorCode ServerController::runContainerWorker(const ServerCredentials &credentials, DockerContainer container, QJsonObject &config)