Case for error cgroup

Added case and case description for: Cgroup Mountpoint Does Not Exist
This commit is contained in:
lunardunno 2025-03-22 14:54:56 +04:00
parent fe0dfbc13d
commit 106a1646b7
3 changed files with 3 additions and 1 deletions

View file

@ -468,7 +468,7 @@ ErrorCode ServerController::runContainerWorker(const ServerCredentials &credenti
if (stdOut.contains("is already in use by container")) if (stdOut.contains("is already in use by container"))
return ErrorCode::ServerPortAlreadyAllocatedError; return ErrorCode::ServerPortAlreadyAllocatedError;
if (stdOut.contains("cgroup mountpoint does not exist")) if (stdOut.contains("cgroup mountpoint does not exist"))
return ErrorCode::ServerCgroupMuntpointDoesNotExist; return ErrorCode::ServerCgroupMountpointDoesNotExist;
if (stdOut.contains("invalid publish")) if (stdOut.contains("invalid publish"))
return ErrorCode::ServerDockerFailedError; return ErrorCode::ServerDockerFailedError;

View file

@ -58,6 +58,7 @@ namespace amnezia
ServerUserDirectoryNotAccessible = 208, ServerUserDirectoryNotAccessible = 208,
ServerUserNotAllowedInSudoers = 209, ServerUserNotAllowedInSudoers = 209,
ServerUserPasswordRequired = 210, ServerUserPasswordRequired = 210,
ServerCgroupMountpointDoesNotExist = 211,
// Ssh connection errors // Ssh connection errors
SshRequestDeniedError = 300, SshRequestDeniedError = 300,

View file

@ -26,6 +26,7 @@ QString errorString(ErrorCode code) {
case(ErrorCode::ServerUserDirectoryNotAccessible): errorMessage = QObject::tr("The server user's home directory is not accessible"); break; case(ErrorCode::ServerUserDirectoryNotAccessible): errorMessage = QObject::tr("The server user's home directory is not accessible"); break;
case(ErrorCode::ServerUserNotAllowedInSudoers): errorMessage = QObject::tr("Action not allowed in sudoers"); break; case(ErrorCode::ServerUserNotAllowedInSudoers): errorMessage = QObject::tr("Action not allowed in sudoers"); break;
case(ErrorCode::ServerUserPasswordRequired): errorMessage = QObject::tr("The user's password is required"); break; case(ErrorCode::ServerUserPasswordRequired): errorMessage = QObject::tr("The user's password is required"); break;
case(ErrorCode::ServerCgroupMountpointDoesNotExist): errorMessage = QObject::tr("Docker error: cgroup mountpoint does not exist"); break;
// Libssh errors // Libssh errors
case(ErrorCode::SshRequestDeniedError): errorMessage = QObject::tr("SSH request was denied"); break; case(ErrorCode::SshRequestDeniedError): errorMessage = QObject::tr("SSH request was denied"); break;