Skip to content
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

Easy Install failed in LXC container - swappiness read only #811

Closed
ljelinek-cznic opened this issue Jun 10, 2019 · 3 comments
Closed

Easy Install failed in LXC container - swappiness read only #811

ljelinek-cznic opened this issue Jun 10, 2019 · 3 comments

Comments

@ljelinek-cznic
Copy link

Issue: Bug report

When using Easy Install in a LXC container it fails due to impossibility to write into /proc/sys/vm/swappiness:

fatal: [localhost]: FAILED! => {"changed": true, "cmd": "echo 1 | tee /proc/sys/vm/swappiness", "delta": "0:00:00.002343", "end": "2019-06-10 14:09:14.273262", "msg": "non-zero return code", "rc": 1, "start": "2019-06-10 14:09:14.270919", "stderr": "tee: /proc/sys/vm/swappiness: Read-only file system", "stderr_lines": ["tee: /proc/sys/vm/swappiness: Read-only file system"], "stdout": "1", "stdout_lines": ["1"]}

To Reproduce
Steps to reproduce the behavior:

  1. Download the install script: wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
  2. Prepare an user as described in the "Easy Install" guide.
  3. Run the installation command: sudo python install.py --production --user [frappe-user]
  4. See error

Expected behavior
The installation succeeds.

Desktop

  • OS: Linux (Kubuntu 19.04)
  • Browser: not applicable

Version Information

  • Which branch are you on?
    • master
  • Frappe Version: master
  • ERPNext Version: master

Possible Solution
If writing into /proc/sys/vm/swappiness fails continue with only warning instead of interrupting with error.

@cypromis
Copy link

How do I use the workaround ? I did not find the playbook that is at fault here

@sharky98
Copy link
Contributor

sharky98 commented Aug 16, 2019

EDIT: Found the solution! So, I was trying to find out how to by-pass that swappiness thing, I found out that the install.py has a --container flag. I don't know what it does, but it does not fail on the swappiness. This should be documented on the readme of Easy Install section!


Same error here on a LXC with Proxmox. I've used master also. The container OS is Ubuntu 18.04.3 LTS. I've tried with both python 2.7.15 and python 3.6.8.

Proxmox packages versions are as follow:

proxmox-ve: 5.4-2 (running kernel: 4.15.18-19-pve)
pve-manager: 5.4-13 (running version: 5.4-13/aee6f0ec)
pve-kernel-4.15: 5.4-7
pve-kernel-4.15.18-19-pve: 4.15.18-45
pve-kernel-4.15.18-18-pve: 4.15.18-44
pve-kernel-4.15.18-15-pve: 4.15.18-40
pve-kernel-4.15.18-11-pve: 4.15.18-34
pve-kernel-4.15.18-9-pve: 4.15.18-30
corosync: 2.4.4-pve1
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.1-12
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-54
libpve-guest-common-perl: 2.0-20
libpve-http-server-perl: 2.0-14
libpve-storage-perl: 5.0-44
libqb0: 1.0.3-1~bpo9
lvm2: 2.02.168-pve6
lxc-pve: 3.1.0-3
lxcfs: 3.0.3-pve1
novnc-pve: 1.0.0-3
proxmox-widget-toolkit: 1.0-28
pve-cluster: 5.0-37
pve-container: 2.0-40
pve-docs: 5.4-2
pve-edk2-firmware: 1.20190312-1
pve-firewall: 3.0-22
pve-firmware: 2.0-7
pve-ha-manager: 2.0-9
pve-i18n: 1.1-4
pve-libspice-server1: 0.14.1-2
pve-qemu-kvm: 3.0.1-4
pve-xtermjs: 3.12.0-1
qemu-server: 5.0-54
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.13-pve1~bpo2

@ViktorNova
Copy link

Thank you, this solved my problem! Would definitely recommend adding this to the readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants