Compare commits

..

1 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
b6b9563300 fix(api): handle missing RAM speed in nested VMs
- Add || true to dmidecode pipelines to prevent error when speed is 'Unknown'
- Validate RAM_SPEED is a valid integer, fallback to 0
- Send ram_speed as integer (not string) in all JSON payloads for PocketBase

Fixes: dmidecode in nested VMs returns 'Configured Memory Speed: Unknown'
which causes grep to fail and triggers catch_errors handler.
2026-02-14 16:07:39 +01:00
9 changed files with 29 additions and 44 deletions

View File

@@ -403,12 +403,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 2026-02-14
### 🚀 Updated Scripts
- #### ✨ New Features
- core: overwriteable app version [@CrazyWolf13](https://github.com/CrazyWolf13) ([#11753](https://github.com/community-scripts/ProxmoxVE/pull/11753))
### 💾 Core
- #### ✨ New Features
@@ -417,10 +411,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- core: improve error reporting with structured error strings and better categorization + output formatting [@MickLesk](https://github.com/MickLesk) ([#11907](https://github.com/community-scripts/ProxmoxVE/pull/11907))
- core: unified logging system with combined logs [@MickLesk](https://github.com/MickLesk) ([#11761](https://github.com/community-scripts/ProxmoxVE/pull/11761))
### 🧰 Tools
- lxc-updater: add patchmon aware [@failure101](https://github.com/failure101) ([#11905](https://github.com/community-scripts/ProxmoxVE/pull/11905))
### ❔ Uncategorized
- Disable UniFi script - APT packages no longer available [@Copilot](https://github.com/Copilot) ([#11898](https://github.com/community-scripts/ProxmoxVE/pull/11898))

View File

@@ -9,7 +9,7 @@ APP="Ollama"
var_tags="${var_tags:-ai}"
var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-40}"
var_disk="${var_disk:-35}"
var_os="${var_os:-ubuntu}"
var_version="${var_version:-24.04}"
var_gpu="${var_gpu:-yes}"

View File

@@ -9,7 +9,7 @@ APP="Open WebUI"
var_tags="${var_tags:-ai;interface}"
var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-8192}"
var_disk="${var_disk:-50}"
var_disk="${var_disk:-25}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"

View File

@@ -1,5 +1,5 @@
{
"generated": "2026-02-14T18:07:29Z",
"generated": "2026-02-14T12:08:41Z",
"versions": [
{
"slug": "2fauth",
@@ -116,9 +116,9 @@
{
"slug": "bentopdf",
"repo": "alam00000/bentopdf",
"version": "v2.2.1",
"version": "v2.2.0",
"pinned": false,
"date": "2026-02-14T16:33:47Z"
"date": "2026-02-09T07:07:40Z"
},
{
"slug": "beszel",
@@ -354,9 +354,9 @@
{
"slug": "firefly",
"repo": "firefly-iii/firefly-iii",
"version": "v6.4.20",
"version": "v6.4.19",
"pinned": false,
"date": "2026-02-14T12:39:02Z"
"date": "2026-02-14T11:55:40Z"
},
{
"slug": "fladder",
@@ -578,9 +578,9 @@
{
"slug": "jackett",
"repo": "Jackett/Jackett",
"version": "v0.24.1113",
"version": "v0.24.1109",
"pinned": false,
"date": "2026-02-14T17:46:58Z"
"date": "2026-02-14T05:54:26Z"
},
{
"slug": "jellystat",
@@ -1411,9 +1411,9 @@
{
"slug": "tandoor",
"repo": "TandoorRecipes/recipes",
"version": "2.5.3",
"version": "2.5.1",
"pinned": false,
"date": "2026-02-14T12:42:14Z"
"date": "2026-02-13T15:57:27Z"
},
{
"slug": "tasmoadmin",

View File

@@ -21,7 +21,7 @@
"resources": {
"cpu": 4,
"ram": 4096,
"hdd": 40,
"hdd": 35,
"os": "Ubuntu",
"version": "24.04"
}

View File

@@ -21,7 +21,7 @@
"resources": {
"cpu": 4,
"ram": 8192,
"hdd": 50,
"hdd": 25,
"os": "debian",
"version": "13"
}

View File

@@ -237,21 +237,16 @@ explain_exit_code() {
# json_escape()
#
# - Escapes a string for safe JSON embedding
# - Strips ANSI escape sequences and non-printable control characters
# - Handles backslashes, quotes, newlines, tabs, and carriage returns
# ------------------------------------------------------------------------------
json_escape() {
local s="$1"
# Strip ANSI escape sequences (color codes etc.)
s=$(printf '%s' "$s" | sed 's/\x1b\[[0-9;]*[a-zA-Z]//g')
s=${s//\\/\\\\}
s=${s//"/\\"/}
s=${s//$'\n'/\\n}
s=${s//$'\r'/}
s=${s//$'\t'/\\t}
# Remove any remaining control characters (0x00-0x1F except those already handled)
s=$(printf '%s' "$s" | tr -d '\000-\010\013\014\016-\037')
printf '%s' "$s"
echo "$s"
}
# ------------------------------------------------------------------------------
@@ -288,7 +283,7 @@ get_error_text() {
fi
if [[ -n "$logfile" && -s "$logfile" ]]; then
tail -n 20 "$logfile" 2>/dev/null | sed 's/\r$//' | sed 's/\x1b\[[0-9;]*[a-zA-Z]//g'
tail -n 20 "$logfile" 2>/dev/null | sed 's/\r$//'
fi
}
@@ -407,14 +402,19 @@ detect_ram() {
if command -v dmidecode &>/dev/null; then
# Get configured memory speed (actual running speed)
RAM_SPEED=$(dmidecode -t memory 2>/dev/null | grep -m1 "Configured Memory Speed:" | grep -oE "[0-9]+" | head -1)
RAM_SPEED=$(dmidecode -t memory 2>/dev/null | grep -m1 "Configured Memory Speed:" | grep -oE "[0-9]+" | head -1 || true)
# Fallback to Speed: if Configured not available
if [[ -z "$RAM_SPEED" ]]; then
RAM_SPEED=$(dmidecode -t memory 2>/dev/null | grep -m1 "Speed:" | grep -oE "[0-9]+" | head -1)
RAM_SPEED=$(dmidecode -t memory 2>/dev/null | grep -m1 "Speed:" | grep -oE "[0-9]+" | head -1 || true)
fi
fi
# Ensure RAM_SPEED is a valid integer (PocketBase stores it as integer)
if [[ -z "$RAM_SPEED" || ! "$RAM_SPEED" =~ ^[0-9]+$ ]]; then
RAM_SPEED=0
fi
export RAM_SPEED
}
@@ -509,7 +509,7 @@ post_to_api() {
"gpu_vendor": "${gpu_vendor}",
"gpu_model": "${gpu_model}",
"gpu_passthrough": "${gpu_passthrough}",
"ram_speed": "${ram_speed}",
"ram_speed": ${ram_speed:-0},
"repo_source": "${REPO_SOURCE}"
}
EOF
@@ -613,7 +613,7 @@ post_to_api_vm() {
"gpu_vendor": "${gpu_vendor}",
"gpu_model": "${gpu_model}",
"gpu_passthrough": "${gpu_passthrough}",
"ram_speed": "${ram_speed}",
"ram_speed": ${ram_speed:-0},
"repo_source": "${REPO_SOURCE}"
}
EOF
@@ -747,7 +747,7 @@ post_update_to_api() {
"gpu_vendor": "${gpu_vendor}",
"gpu_model": "${gpu_model}",
"gpu_passthrough": "${gpu_passthrough}",
"ram_speed": "${ram_speed}",
"ram_speed": ${ram_speed:-0},
"repo_source": "${REPO_SOURCE}"
}
EOF
@@ -789,7 +789,7 @@ EOF
"gpu_vendor": "${gpu_vendor}",
"gpu_model": "${gpu_model}",
"gpu_passthrough": "${gpu_passthrough}",
"ram_speed": "${ram_speed}",
"ram_speed": ${ram_speed:-0},
"repo_source": "${REPO_SOURCE}"
}
EOF
@@ -886,7 +886,7 @@ categorize_error() {
# Signal/Process errors (SIGTERM, SIGPIPE, SIGSEGV)
139 | 141 | 143) echo "signal" ;;
# Shell errors (general error, syntax error)
# Shell errors (general error, syntax error)
1 | 2) echo "shell" ;;
# Default - truly unknown

View File

@@ -1913,7 +1913,7 @@ function fetch_and_deploy_codeberg_release() {
local app="$1"
local repo="$2"
local mode="${3:-tarball}" # tarball | binary | prebuild | singlefile | tag
local version="${var_appversion:-${4:-latest}}"
local version="${4:-latest}"
local target="${5:-/opt/$app}"
local asset_pattern="${6:-}"
@@ -2443,7 +2443,7 @@ function fetch_and_deploy_gh_release() {
local app="$1"
local repo="$2"
local mode="${3:-tarball}" # tarball | binary | prebuild | singlefile
local version="${var_appversion:-${4:-latest}}"
local version="${4:-latest}"
local target="${5:-/opt/$app}"
local asset_pattern="${6:-}"

View File

@@ -110,11 +110,6 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
container_hostname=$(pct exec "$container" hostname)
containers_needing_reboot+=("$container ($container_hostname)")
fi
# check if patchmon agent is present in container and run a report if found
if pct exec "$container" -- [ -e "/usr/local/bin/patchmon-agent" ]; then
echo -e "${BL}[Info]${GN} patchmon-agent found in ${BL} $container ${CL}, triggering report. \n"
pct exec "$container" -- "/usr/local/bin/patchmon-agent" "report"
fi
fi
done
wait