github fabriziosalmi/proxmox-lxc-autoscale v2.0.2

5 hours ago

Bug fix release. Recommended for anyone running 2.0.x, and required for anyone installing from scratch.

Fixed

Page cache no longer counts as used memory (#51, #52)

Memory usage was read from the raw cgroup counters, memory.current on cgroup v2 and memory.usage_in_bytes on v1. Both include reclaimable file cache. Proxmox reports the same counter minus the page cache, which is why the daemon and the Proxmox UI could disagree by an order of magnitude, for example 65 percent against 3.6 percent.

In practice any container doing file I/O looked permanently full: it never fell below memory_lower_threshold, so it was never scaled down, and it could be scaled up again right after a manual downscale.

Usage now subtracts the page cache reported in memory.stat, using file on cgroup v2 and total_cache on v1, matching the Proxmox UI. The pct exec fallback path follows the same accounting.

New option memory_exclude_cache, default true. Set it to false to count page cache as used memory, which is the previous behaviour.

Installer produced a broken installation (#53)

install.sh downloaded 9 of the 13 Python modules of the package. state.py, ssh.py, errors.py, boost.py and the whole backends/ package were missing, so a fresh installation failed at startup on from state import get_state_cache. This affected every installation from scratch since 2.0.0.

The installer now fetches the complete package, aborts on any download error with curl --fail instead of writing an HTTP error page into a .py file, and validates the result with py_compile before enabling the service.

Installer dependencies

python3-yaml and python3-pydantic were never installed, and Debian 12, which is Proxmox VE 8, ships pydantic 1.x, which the config models reject. Both are installed now, with a pip fallback when the distribution does not provide pydantic 2.

Version string

__version__ had been left at 2.0.0 through the 2.0.1 release.

Changed

  • install.sh honours LXC_AUTOSCALE_REF to install from a specific tag or branch instead of main.
  • Removed the unused Codeflash workflow, which failed on every pull request touching lxc_autoscale/.

Upgrading

Re-run the installer, or update in place and restart the service:

systemctl restart lxc_autoscale

After the upgrade, memory percentages in the log should match what the Proxmox UI shows for the same container.

Thanks to @huhn3k for reporting #51 with the memory.stat data that pinpointed the cause.

Don't miss a new proxmox-lxc-autoscale release

NewReleases is sending notifications on new releases.