[revert this] added some logging again

This commit is contained in:
Jean-Louis Leysens 2022-04-20 16:57:54 +02:00 committed by GitHub
parent 7ae3e3978e
commit d21e8080e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,8 +21,12 @@ export function systemHasInsufficientMemory(
cloud: undefined | CloudSetup,
logger: Logger
): boolean {
logger.fatal(`isCloudEnabled ${Boolean(cloud?.isCloudEnabled)}`);
logger.fatal(`hasDeploymentId ${Boolean(cloud?.deploymentId)}`);
logger.fatal(`has cloud ${Boolean(cloud?.isCloudEnabled || cloud?.deploymentId)}`);
if (!Boolean(cloud?.isCloudEnabled || cloud?.deploymentId)) return false;
const limit = readMemoryLimit();
logger.fatal(`memory limit from cgroups ${limit}`);
logger.info(`Memory limit from cgroup (in bytes): ${limit}`);
return limit < MIN_CLOUD_OS_MEM_BYTES;
}