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

ERROR: pacemaker-controld:metadata: got no meta-data, does this RA exist? #982

Open samuelfusato opened 2 years ago

samuelfusato commented 2 years ago

Hello,

TL;DR - SLES15-SP3, two-nodes cluster, same /etc/crm/crm.conf file on both nodes, when user invokes the "crm configure" shell, then type "property" the following error appears on the console:

crm(live/hostname) configure# property sudo: pacemaker-controld command not found
DEBUG: pacemaker-controld metadata exited with code 1
ERROR: pacemaker-controld:metadata: got no meta-data, does this RA exist?

The debug does not go too far, as per the above messages. The sudoers files are okay and user is logging into the system as root directly. The env variables are exactly the same on both nodes (the node 01 has this crm issue while the 02 does not).

Package version:

crmsh-4.3.1+20220505.cf4ab649-150200.5.80.1.noarch 
crmsh-scripts-4.3.1+20220505.cf4ab649-150200.5.80.1.noarch
---
kmod-bash-completion-29-4.15.1.noarch 
libvirt-bash-completion-7.1.0-150300.6.29.1.noarch 
bash-completion-devel-2.7-4.6.1.noarch 
bash-completion-2.7-4.6.1.noarch       
bash-lang-4.4-19.6.1.noarch            
bash-doc-4.4-19.6.1.noarch             
bash-4.4-19.6.1.x86_64                 
bash-completion-doc-2.7-4.6.1.noarch  

Could you kindly help on this? Thanks for any help you can provide.

Cheers.

liangxin1300 commented 2 years ago

Hi @samuelfusato

I guess you've set core.user in crm.conf? see https://github.com/ClusterLabs/crmsh/blob/733357e29d921d33b67a4ac501ee5bceab241a53/crmsh/utils.py#L353 In above line, run su -E -u <user> pacemaker-controld, got the above error sudo: pacemaker-controld command not found

samuelfusato commented 2 years ago

Dear @liangxin1300,

Thanks for your answer. This is the content of /etc/crm/crm.conf:

 [core]
debug = yes
[path]
crm_daemon_user = hacluster
ocf_root = /usr/lib/ocf
liangxin1300 commented 2 years ago

Could you please remove add_sudo in this line? https://github.com/ClusterLabs/crmsh/blob/733357e29d921d33b67a4ac501ee5bceab241a53/crmsh/utils.py#L819 Like rc, s = get_stdout(cmd, stderr_on=stderr_on, shell=shell)

If it works, please print config.core.user in this function to see what value it is

samuelfusato commented 2 years ago

Hi @liangxin1300,

Your suggestion fixed the issue. However, I could not obtain the print from my customer (I tried once but I preferred not to push them on this) and I hope you understand.

Thank you so much for your kind assistance.

liangxin1300 commented 2 years ago

Yeah, that is only a workaround, not fix the root cause yet