pveversion parsing includes patch version, breaking version range checks #1398

Closed
opened 2026-02-05 00:37:40 +03:00 by OVERLORD · 11 comments
Owner

Originally created by @Nico-Stark on GitHub (Aug 4, 2025).

3b1b8a7da2/misc/build.func (L70C12-L70C75)

Currently, the script uses the following to extract the Proxmox version:

PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"

This returns the full semantic version, e.g. 8.4.5.

However, later version checks (e.g. regex matching ^8\.([0-9]+)$) assume only the major and minor version are present, like 8.4. This causes checks like the following to fail unexpectedly:

if [[ "$PVE_VER" =~ ^8\.([0-9]+)$ ]]; then ... fi

Suggested Fix:
Truncate the version to major.minor using cut:

PVE_VER="$(pveversion | awk -F'[/-]' '{print $2}' | cut -d. -f1,2)"

This ensures compatibility with version checks relying on a consistent format.

Impact:

Without this fix, the script misclassifies valid versions (e.g. 8.4.5) as unsupported when only patch versions differ.

Example:

pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}'
8.4.5
Image Image

...

Originally created by @Nico-Stark on GitHub (Aug 4, 2025). https://github.com/community-scripts/ProxmoxVE/blob/3b1b8a7da2c6118510ce05d49468eed45a347c81/misc/build.func#L70C12-L70C75 Currently, the script uses the following to extract the Proxmox version: `PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"` This returns the full semantic version, e.g. `8.4.5`. However, later version checks (e.g. regex matching `^8\.([0-9]+)$`) assume only the major and minor version are present, like `8.4`. This causes checks like the following to fail unexpectedly: `if [[ "$PVE_VER" =~ ^8\.([0-9]+)$ ]]; then ... fi` **Suggested Fix:** Truncate the version to `major.minor` using `cut`: `PVE_VER="$(pveversion | awk -F'[/-]' '{print $2}' | cut -d. -f1,2)"` This ensures compatibility with version checks relying on a consistent format. **Impact:** Without this fix, the script misclassifies valid versions (e.g. `8.4.5`) as unsupported when only patch versions differ. **Example:** ``` pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}' 8.4.5 ``` <img width="650" height="197" alt="Image" src="https://github.com/user-attachments/assets/696c1ebd-e754-462b-818b-50f77fb890fd" /> <img width="642" height="204" alt="Image" src="https://github.com/user-attachments/assets/07d7b406-ffa6-4da9-93b8-b5c28bf4c7a4" /> ...
OVERLORD added the not a script issue label 2026-02-05 00:37:40 +03:00
Author
Owner

@MickLesk commented on GitHub (Aug 4, 2025):

What? 😄 Every Script runs fine here. And for thousands of other users too. 8.1.x - 8.4.6 (current)

Whats your Issue?! The script is designed to be extra tolerant, as otherwise every absolute minor version would have to be patched through.

@MickLesk commented on GitHub (Aug 4, 2025): What? :smile: Every Script runs fine here. And for thousands of other users too. 8.1.x - 8.4.6 (current) Whats your Issue?! The script is designed to be extra tolerant, as otherwise every absolute minor version would have to be patched through.
Author
Owner

@Nico-Stark commented on GitHub (Aug 4, 2025):

What? 😄 Every Script runs fine here. And for thousands of other users too. 8.1.x - 8.4.6 (current)

Whats your Issue?! The script is designed to be extra tolerant, as otherwise every absolute minor version would have to be patched through.

And that’s exactly why I’m confused 😄
Because for me it only works when I modify the script locally.

Without adjusting the version parsing (e.g. stripping the patch level), the version check fails

@Nico-Stark commented on GitHub (Aug 4, 2025): > What? 😄 Every Script runs fine here. And for thousands of other users too. 8.1.x - 8.4.6 (current) > > Whats your Issue?! The script is designed to be extra tolerant, as otherwise every absolute minor version would have to be patched through. And that’s exactly why I’m confused 😄 Because for me it only works when I modify the script locally. Without adjusting the version parsing (e.g. stripping the patch level), the version check fails
Author
Owner

@MickLesk commented on GitHub (Aug 4, 2025):

Whats your pvemanager?

Ive 3 different nodes.

8.4.2 8.4.6 and 9.0.0-Beta17.

All Work fine

@MickLesk commented on GitHub (Aug 4, 2025): Whats your pvemanager? Ive 3 different nodes. 8.4.2 8.4.6 and 9.0.0-Beta17. All Work fine
Author
Owner

@Nico-Stark commented on GitHub (Aug 4, 2025):

My pveversion returns:
8.4.5

pveversion pve-manager/8.4.5/57892e8e686cb35b (running kernel: 6.8.12-11-pve)

@Nico-Stark commented on GitHub (Aug 4, 2025): My `pveversion` returns: `8.4.5` `pveversion pve-manager/8.4.5/57892e8e686cb35b (running kernel: 6.8.12-11-pve)`
Author
Owner

@MickLesk commented on GitHub (Aug 4, 2025):

Update & reboot your node?

@MickLesk commented on GitHub (Aug 4, 2025): Update & reboot your node?
Author
Owner

@onethree7 commented on GitHub (Aug 4, 2025):

root@pve Aug 4 16:43 ~ > pveversion
pve-manager/8.4.5/57892e8e686cb35b (running kernel: 6.8.12-13-pve)

Cannot repro this either.

root@pve Aug 4 16:46 ~ > pve_check() {
  local PVE_VER
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"

  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
    local MINOR="${BASH_REMATCH[1]}"
    if ((MINOR < 1 || MINOR > 4)); then
      msg_error "This version of Proxmox VE is not supported."
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
      exit 1
    fi
    return 0
  fi
> }
root@pve Aug 4 16:47 ~ > pve_check && echo "OK" || echo "FAIL"
OK
@onethree7 commented on GitHub (Aug 4, 2025): >root@pve Aug 4 16:43 ~ > pveversion >pve-manager/8.4.5/57892e8e686cb35b (running kernel: 6.8.12-13-pve) Cannot repro this either. ``` root@pve Aug 4 16:46 ~ > pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" if ((MINOR < 1 || MINOR > 4)); then msg_error "This version of Proxmox VE is not supported." echo -e "Required: Proxmox VE version 8.1 – 8.4" exit 1 fi return 0 fi > } ``` ``` root@pve Aug 4 16:47 ~ > pve_check && echo "OK" || echo "FAIL" OK ```
Author
Owner

@Nico-Stark commented on GitHub (Aug 4, 2025):

Unfortunately, I’m still facing the same issue — even after the upgrade and a reboot.

root@pve Aug 4 16:43 ~ > pveversion
pve-manager/8.4.5/57892e8e686cb35b (running kernel: 6.8.12-13-pve)

Cannot repro this either.

root@pve Aug 4 16:46 ~ > pve_check() {
  local PVE_VER
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"

  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
    local MINOR="${BASH_REMATCH[1]}"
    if ((MINOR < 1 || MINOR > 4)); then
      msg_error "This version of Proxmox VE is not supported."
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
      exit 1
    fi
    return 0
  fi
> }
root@pve Aug 4 16:47 ~ > pve_check && echo "OK" || echo "FAIL"
OK

And now confusion is officially confused 😄
I get the exact same result as you when running it manually.
But when the script runs, it still throws the error.

Raw: pve-manager/8.4.6/c5b55b84d1f84ea6 (running kernel: 6.8.12-13-pve)
Parsed: 8.4.6
Version OK: 8.4.6
OK
@Nico-Stark commented on GitHub (Aug 4, 2025): Unfortunately, I’m still facing the same issue — even after the upgrade and a reboot. > > root@pve Aug 4 16:43 ~ > pveversion > > pve-manager/8.4.5/57892e8e686cb35b (running kernel: 6.8.12-13-pve) > > Cannot repro this either. > > ``` > root@pve Aug 4 16:46 ~ > pve_check() { > local PVE_VER > PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" > > if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then > local MINOR="${BASH_REMATCH[1]}" > if ((MINOR < 1 || MINOR > 4)); then > msg_error "This version of Proxmox VE is not supported." > echo -e "Required: Proxmox VE version 8.1 – 8.4" > exit 1 > fi > return 0 > fi > > } > ``` > > ``` > root@pve Aug 4 16:47 ~ > pve_check && echo "OK" || echo "FAIL" > OK > ``` And now confusion is officially confused 😄 I get the exact same result as you when running it manually. But when the script runs, it still throws the error. ```pve_check && echo "OK" || echo "FAIL" Raw: pve-manager/8.4.6/c5b55b84d1f84ea6 (running kernel: 6.8.12-13-pve) Parsed: 8.4.6 Version OK: 8.4.6 OK
Author
Owner

@MickLesk commented on GitHub (Aug 4, 2025):

And you run the correct scripts? ^^

@MickLesk commented on GitHub (Aug 4, 2025): And you run the correct scripts? ^^
Author
Owner

@Nico-Stark commented on GitHub (Aug 4, 2025):

I tried this for example
bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/keycloak.sh)"
and this
bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/linkwarden.sh)"

@Nico-Stark commented on GitHub (Aug 4, 2025): I tried this for example `bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/keycloak.sh)"` and this `bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/linkwarden.sh)" `
Author
Owner

@MickLesk commented on GitHub (Aug 4, 2025):

yeah and you are fully wrong ^^

@MickLesk commented on GitHub (Aug 4, 2025): yeah and you are fully wrong ^^
Author
Owner

@Nico-Stark commented on GitHub (Aug 4, 2025):

Oh how silly — that’s your old branch! 😅
I’m going to stand in the corner and be ashamed of myself now 😅

@Nico-Stark commented on GitHub (Aug 4, 2025): Oh how silly — that’s your old branch! 😅 I’m going to stand in the corner and be ashamed of myself now 😅
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#1398