Skip to content

permission denied on key "vm.overcommit_memory" in LXC container on update to v9.13 #7550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jwgn opened this issue May 26, 2025 · 2 comments · Fixed by #7552
Open

permission denied on key "vm.overcommit_memory" in LXC container on update to v9.13 #7550

jwgn opened this issue May 26, 2025 · 2 comments · Fixed by #7552
Labels
Bug 🐞 Container Live patch request 🔧 Regression Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible.
Milestone

Comments

@jwgn
Copy link

jwgn commented May 26, 2025

Creating a bug report/issue

  • [X ] I have searched the existing open and closed issues

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=9 G_DIETPI_VERSION_SUB=12 G_DIETPI_VERSION_RC=1 G_GITBRANCH='master' G_GITOWNER='MichaIng'
  • Distro version | bookworm
  • Kernel version | Linux nextcloud 6.8.12-10-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-10 (2025-04-18T07:39Z) x86_64 GNU/Linux
  • SBC model | Container (x86_64) on Proxmox
  • Power supply used | none
  • SD card used | none

Additional Information (if applicable)

  • Software title | Nextcloud
  • Was the software title installed freshly or updated/migrated?
    = Update
  • Can this issue be replicated on a fresh installation of DietPi?
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

  1. Run dietpi-update on nextcloud container

Expected behaviour

  • Upgrade to v9.13 should take place

Actual behaviour

  OK  ] DietPi-Patch | eval echo 'vm.overcommit_memory=1' > /etc/sysctl.d/98-dietpi-redis.conf
[.     ]sysctl: permission denied on key "vm.overcommit_memory".conf
[FAILED] DietPi-Patch | sysctl -p /etc/sysctl.d/98-dietpi-redis.conf
[FAILED] DietPi-Patch | Unable to continue, DietPi-Patch will now terminate.
[FAILED] DietPi-Update | An error occurred during incremental patching. Please check the above log or /var/tmp/dietpi/logs/dietpi-update.log for errors, and rerun "dietpi-update" after the cause has been solved.

Extra details

  • ...
@jwgn jwgn changed the title permission denied on key "vm.overcommit_memory" in LXC container permission denied on key "vm.overcommit_memory" in LXC container on update to v9.13 May 26, 2025
@MichaIng MichaIng added this to the v9.14 milestone May 26, 2025
@MichaIng
Copy link
Owner

Oh that makes sense. In containers, sysctl can generally not work. This is something that would need to be applied on the host. For the update, for now, please use "Change command" and place it with : (colon) or true.

I'll push a live patch to skip this on container systems.

@MichaIng
Copy link
Owner

MichaIng commented May 26, 2025

Live patch merged, so the update will now go through, as well as fresh installs of affected software options: #7552

However, for next release, we need to implement a warning that respective sysctl settings change is required or recommended, for the software to work properly, and should hence be done at the host system.

Means in your case, check whether sysctl vm.overcommit_memory reports 1 on the host (can be also tested in the guest), else you can do so:

echo 'vm.overcommit_memory=1' | sudo tee /etc/sysctl.d/98-dietpi-redis.conf
sudo sysctl -p /etc/sysctl.d/98-dietpi-redis.conf

@MichaIng MichaIng added the Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible. label May 26, 2025
@MichaIng MichaIng linked a pull request May 26, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Container Live patch request 🔧 Regression Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants