ClusterLabs / crmsh

Command-line interface for High-Availability cluster management on GNU/Linux systems.
GNU General Public License v2.0
131 stars 94 forks source link

CRM works when run without sudo, but fails to start when run with sudo #1214

Closed ghevge closed 1 year ago

ghevge commented 1 year ago

I've installed the latest crmsh on my fedora system, but I am seeing a weird problem: CRM works when run without sudo, but fails to start when run with sudo. Any idea what could be wrong?

[bebe@server1 crmsh-4.5.0]$ sudo crm
Fatal error:
    No module named 'parallax'

Failed to start crmsh! This is likely due to:
- A missing dependency (eg. corresponding python3 version)
- A broken installation

If you are using a packaged version of crmsh, please try
reinstalling the package. Also check your PYTHONPATH and
make sure that the crmsh module is reachable.

Please file an issue describing your installation at
https://github.com/Clusterlabs/crmsh/issues/ .
[bebe@server1 crmsh-4.5.0]$ crm
WARNING: Failed to open log file: [Errno 13] Permission denied: '/var/log/crmsh/crmsh.log'
crm(live/server1.test)#

My python version:

[bebe@server1 crmsh-4.5.0]$ python --version
Python 3.11.4
ghevge commented 1 year ago

Hmm OK found my problem. I've initially installed parallax like this "pip install parallax" . It seems that I have to installed it with sudo in order for sudo crm to work: "sudo pip install parallax";