Merge branch 'main' into anvil-tools-dev

main
Digimer 2 years ago committed by GitHub
commit 778e35ae83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      Anvil/Tools/Get.pm
  2. 1
      anvil.spec.in
  3. 607
      striker-ui-api/package-lock.json
  4. 2
      striker-ui-api/package.json

@ -704,10 +704,29 @@ ORDER BY
}}); }});
} }
# Take 4 GiB off the available RAM for the host # Check if the reserved RAM is overriden by the config
$anvil->data->{anvil_resources}{$anvil_uuid}{ram}{reserved} = (4*(2**30)); # Reserve 4 GiB my $ram_reserved = $anvil->Convert->human_readable_to_bytes({
base2 => 1,
size => $anvil->data->{anvil_resources}{ram}{reserved},
});
if (($ram_reserved eq "!!error!!") or
(not $ram_reserved) or
($ram_reserved < (2**30)) or
($ram_reserved > $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{hardware}))
{
# The reserved RAM is invalid, so reset it.
$ram_reserved = 0;
}
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
"anvil_resources::ram::reserved" => $ram_reserved." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $ram_reserved}).")",
}});
# Take 4 GiB or what was provided by the config off the available RAM for the host
$anvil->data->{anvil_resources}{$anvil_uuid}{ram}{reserved} = $ram_reserved ? $ram_reserved : (4*(2**30)); # Reserve 4 GiB by default or what's set in the config file.
$anvil->data->{anvil_resources}{$anvil_uuid}{ram}{available} -= $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{reserved}; $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{available} -= $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{reserved};
$anvil->data->{anvil_resources}{$anvil_uuid}{ram}{available} -= $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{allocated}; $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{available} -= $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{allocated};
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
"anvil_resources::${anvil_uuid}::ram::allocated" => $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{allocated}." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{allocated}}).")", "anvil_resources::${anvil_uuid}::ram::allocated" => $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{allocated}." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{allocated}}).")",
"anvil_resources::${anvil_uuid}::ram::reserved" => $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{reserved}." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{reserved}}).")", "anvil_resources::${anvil_uuid}::ram::reserved" => $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{reserved}." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $anvil->data->{anvil_resources}{$anvil_uuid}{ram}{reserved}}).")",

@ -63,6 +63,7 @@ Requires: lsscsi
Requires: mailx Requires: mailx
Requires: mlocate Requires: mlocate
Requires: net-snmp-utils Requires: net-snmp-utils
Requires: NetworkManager-initscripts-updown
Requires: nvme-cli Requires: nvme-cli
Requires: pciutils Requires: pciutils
Requires: perl-Capture-Tiny Requires: perl-Capture-Tiny

File diff suppressed because it is too large Load Diff

@ -12,7 +12,7 @@
}, },
"dependencies": { "dependencies": {
"cors": "^2.8.5", "cors": "^2.8.5",
"express": "^4.17.1", "express": "^4.18.2",
"multer": "^1.4.4" "multer": "^1.4.4"
}, },
"devDependencies": { "devDependencies": {

Loading…
Cancel
Save