Closed profucius closed 1 month ago
Thank You to point me out to that, it seems that the issue is caused by:
ModuleNotFoundError: No module named 'paramiko'
Can you try to run pip install paramiko
then run agains the installer? It's already included in the requirements.txt then should work.
In any case I will double check this evening and a fix will be released before the end of the weekend :)
Hi thanks for the reply. I have done as you instructed, and this is the log output. Note: I do this from the Proxmox WebUI, under Datacenter>PVE>Shell:
root@pve:~# pip install paramiko
Collecting paramiko
Downloading paramiko-3.5.0-py3-none-any.whl (227 kB)
ββββββββββββββββββββββββββββββββββββββββ 227.1/227.1 kB 3.6 MB/s eta 0:00:00
Collecting bcrypt>=3.2
Downloading bcrypt-4.2.0-cp39-abi3-manylinux_2_28_x86_64.whl (273 kB)
ββββββββββββββββββββββββββββββββββββββββ 273.8/273.8 kB 7.6 MB/s eta 0:00:00
Requirement already satisfied: cryptography>=3.3 in /usr/local/lib/python3.11/dist-packages (from paramiko) (43.0.0)
Collecting pynacl>=1.5
Downloading PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (856 kB)
ββββββββββββββββββββββββββββββββββββββββ 856.7/856.7 kB 11.9 MB/s eta 0:00:00
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.11/dist-packages (from cryptography>=3.3->paramiko) (1.17.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.11/dist-packages (from cffi>=1.12->cryptography>=3.3->paramiko) (2.22)
Installing collected packages: bcrypt, pynacl, paramiko
Successfully installed bcrypt-4.2.0 paramiko-3.5.0 pynacl-1.5.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
After this, I run the installer again, and I have the same issue as before.
apt install python3-paramiko
will fix the issue.
The install.sh
script has been updatedπ»
@fabriziosalmi the splitting of the ML autoscaler reintroduced this issue again : / Shall I add a PR?
apt install python3-paramiko
will fix the issue. Theinstall.sh
script has been updatedπ»
I ran this and it installed the packages. I ran the updated installer script, and I am still having the same issue:
=============================
Welcome to the LXC AutoScale cleanup and installation script!
=============================
2024-09-29 11:55:04 [INFO] Creating backups...
2024-09-29 11:55:04 [INFO] Backed up /etc/lxc_autoscale/lxc_autoscale.yaml to /etc/lxc_autoscale/lxc_autoscale.yaml_backup_20240929115504
2024-09-29 11:55:04 [INFO] Deleting specified files and folders...
2024-09-29 11:55:04 [INFO] Deleted /etc/lxc_autoscale/lxc_autoscale.yaml
2024-09-29 11:55:04 [INFO] Deleted /var/log/lxc_autoscale.log
2024-09-29 11:55:04 [INFO] Deleted /var/lib/lxc_autoscale/backups
2024-09-29 11:55:04 [INFO] Installing LXC AutoScale...
Failed to disable unit: Unit file lxc_autoscale_ml.service does not exist.
Failed to stop lxc_autoscale_ml.service: Unit lxc_autoscale_ml.service not loaded.
2024-09-29 11:55:06 [INFO] β
Service LXC AutoScale started successfully!
2024-09-29 11:55:06 [INFO] β
Installation process complete!
@fabriziosalmi the splitting of the ML autoscaler reintroduced this issue again : / Shall I add a PR?
as u can understand I need some contributions π―
apt install python3-paramiko
will fix the issue. Theinstall.sh
script has been updatedπ»I ran this and it installed the packages. I ran the updated installer script, and I am still having the same issue:
============================= Welcome to the LXC AutoScale cleanup and installation script! ============================= 2024-09-29 11:55:06 [INFO] β Service LXC AutoScale started successfully! 2024-09-29 11:55:06 [INFO] β Installation process complete!
can you check if is running for real? systemctl status lxc_autoscale
This is my log output from that command. Perhaps it is working after all? If so, then perhaps the script (or the Readme) should let the user know that they should run that command to check that it is working, in the event there is an error message?
root@pve:~# systemctl status lxc_autoscale
β lxc_autoscale.service - LXC AutoScale Daemon
Loaded: loaded (/etc/systemd/system/lxc_autoscale.service; enabled; preset: enabled)
Active: active (running) since Sun 2024-09-29 11:55:06 EDT; 2 days ago
Docs: https://github.com/fabriziosalmi/proxmox-lxc-autoscale
Main PID: 292529 (python3)
Tasks: 1 (limit: 47871)
Memory: 31.8M
CPU: 1h 33min 1.155s
CGroup: /system.slice/lxc_autoscale.service
ββ292529 /usr/bin/python3 /usr/local/bin/lxc_autoscale/lxc_autoscale.py
Oct 01 15:36:54 pve python3[292529]: 2024-10-01 15:36:54 - Starting resource allocation process...
Oct 01 15:36:54 pve python3[292529]: 2024-10-01 15:36:54 - Ignoring LXC Containers: set()
Oct 01 15:36:54 pve python3[292529]: 2024-10-01 15:36:54 - Initial resources before adjustments: 4 cores, 35862>
Oct 01 15:36:54 pve python3[292529]: 2024-10-01 15:36:54 - Current resource usage for all containers:
Oct 01 15:36:54 pve python3[292529]: 2024-10-01 15:36:54 - Container 107: CPU usage: 37.36%, Memory usage: 11.1>
Oct 01 15:36:54 pve python3[292529]: 2024-10-01 15:36:54 - Container 103: CPU usage: 37.23%, Memory usage: 32.9>
Oct 01 15:36:54 pve python3[292529]: 2024-10-01 15:36:54 - Container 100: CPU usage: 40.69%, Memory usage: 55.2>
Oct 01 15:36:54 pve python3[292529]: 2024-10-01 15:36:54 - Container 112: CPU usage: 52.66%, Memory usage: 16.9>
Oct 01 15:36:54 pve python3[292529]: 2024-10-01 15:36:54 - Final resources after adjustments: 4 cores, 35862 MB>
Oct 01 15:36:54 pve python3[292529]: 2024-10-01 15:36:54 - Resource allocation process completed. Next run in 6>
On error the service unit must fail :) You can check that on the /var/log/lxc_autoscale.log
but it seems everything works as expected there :)
Thanks for your help. I recommend making a note on the README.md to bring attention to what we've discovered in this ticket: That the error is a red herring, and the script could be working fine, if the user runs the status command to check.
Desktop (please complete the following information):
Describe the bug Something seems to be wrong when I try to install the script. I run:
curl -sSL https://raw.githubusercontent.com/fabriziosalmi/proxmox-lxc-autoscale/main/install.sh | bash
Which results in:
Then I run:
systemctl status lxc_autoscale.service
I get this response:
I'm under the assumption that the script handles the creation and installation of all files, so I haven't done any manual file manipulation in attempt to resolve. What should I do next?