Compare commits

..

1 Commits

Author SHA1 Message Date
NickVs2015
6ed96e6a10 chore: add logs 2026-06-11 13:32:34 +03:00
3 changed files with 14 additions and 1 deletions

View File

@@ -117,6 +117,9 @@ WireguardConfigurator::ConnectionData WireguardConfigurator::prepareWireguardCon
connData.port = portStr;
if (connData.clientPrivKey.isEmpty() || connData.clientPubKey.isEmpty()) {
qCritical() << "WireguardConfigurator: prepareWireguardConfig: genClientKeys failed"
<< "privKey.isEmpty=" << connData.clientPrivKey.isEmpty()
<< "pubKey.isEmpty=" << connData.clientPubKey.isEmpty();
errorCode = ErrorCode::InternalError;
return connData;
}

View File

@@ -273,6 +273,8 @@ ErrorCode InstallController::updateClientConfig(const QString &serverId, DockerC
return ErrorCode::NoError;
}
default:
qCritical() << "InstallController: updateClientConfig: unexpected server kind for serverId=" << serverId
<< "kind=" << static_cast<int>(m_serversRepository->serverKind(serverId));
return ErrorCode::InternalError;
}
}
@@ -1235,14 +1237,18 @@ ErrorCode InstallController::installContainer(const QString &serverId, DockerCon
{
auto adminConfig = m_serversRepository->selfHostedAdminConfig(serverId);
if (!adminConfig.has_value()) {
qCritical() << "InstallController: installContainer: selfHostedAdminConfig nullopt, serverId=" << serverId;
return ErrorCode::InternalError;
}
ServerCredentials credentials = adminConfig->credentials();
if (!credentials.isValid()) {
qCritical() << "InstallController: installContainer: credentials invalid, serverId=" << serverId
<< "host=" << credentials.hostName << "user=" << credentials.userName
<< "port=" << credentials.port << "hasSecret=" << !credentials.secretData.isEmpty();
return ErrorCode::InternalError;
}
SshSession sshSession(this);
QMap<DockerContainer, ContainerConfig> installedContainers;
ErrorCode errorCode = getAlreadyInstalledContainers(credentials, installedContainers, sshSession);
if (errorCode) {

View File

@@ -114,6 +114,8 @@ void InstallUiController::install(DockerContainer container, int port, Transport
const QString newServerId = m_serversController->getServerId(m_serversController->getServersCount() - 1);
const auto admin = m_serversController->selfHostedAdminConfig(newServerId);
if (!admin.has_value()) {
qCritical() << "InstallUiController: install(new): selfHostedAdminConfig nullopt, newServerId=" << newServerId
<< "serversCount=" << m_serversController->getServersCount();
emit installationErrorOccurred(ErrorCode::InternalError);
return;
}
@@ -138,6 +140,7 @@ void InstallUiController::install(DockerContainer container, int port, Transport
} else {
const auto adminBefore = m_serversController->selfHostedAdminConfig(serverId);
if (!adminBefore.has_value()) {
qCritical() << "InstallUiController: install(existing): selfHostedAdminConfig nullopt before install, serverId=" << serverId;
emit installationErrorOccurred(ErrorCode::InternalError);
return;
}
@@ -154,6 +157,7 @@ void InstallUiController::install(DockerContainer container, int port, Transport
const auto adminAfter = m_serversController->selfHostedAdminConfig(serverId);
if (!adminAfter.has_value()) {
qCritical() << "InstallUiController: install(existing): selfHostedAdminConfig nullopt after install, serverId=" << serverId;
emit installationErrorOccurred(ErrorCode::InternalError);
return;
}