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 history info" command fails to run the second time... #1134

Closed akoma-2a closed 1 year ago

akoma-2a commented 1 year ago

Hi, For some reasons I can not get the proper output of the "crm history info" command First time I ran it gives the right output ... node1:~ # date; crm history info Sat Feb 25 21:58:01 CET 2023 INFO: Retrieving information from cluster nodes, please wait... Source: live Created on: Sat Feb 25 21:58:11 CST 2023 By: report -Z -Q -f Sat Feb 25 19:58:01 2023 /var/cache/crm/history-root/live Period: 2023-02-25 20:58:01 - 2023-02-25 22:58:23 Nodes: node1 node2 Groups: Clones: msl_SAPHana_FU2_HDB02 cln_SAPHanaTopology_FU2_HDB02 cl-EmailToAdmin Resources: stonith-sbd rsc_ip_FU2_HDB02 rsc_SAPHana_FU2_HDB02 rsc_SAPHanaTopology_FU2_HDB02 EmailToAdmin Transitions: node1:~ # ...

whereas the second time it fails with "RuntimeError: threads can only be started once" ... node1:~ # date; crm history info Sat Feb 25 21:59:47 CET 2023 INFO: Fetching updated logs from cluster nodes. Please wait... Traceback (most recent call last): File "/usr/sbin/crm", line 46, in rc = main.run() File "/usr/lib/python3.6/site-packages/crmsh/main.py", line 370, in run return main_input_loop(context, user_args) File "/usr/lib/python3.6/site-packages/crmsh/main.py", line 249, in main_input_loop rc = handle_noninteractive_use(context, user_args) File "/usr/lib/python3.6/site-packages/crmsh/main.py", line 205, in handle_noninteractive_use if context.run(' '.join(l)): File "/usr/lib/python3.6/site-packages/crmsh/ui_context.py", line 91, in run rv = self.execute_command() is not False File "/usr/lib/python3.6/site-packages/crmsh/ui_context.py", line 283, in execute_command rv = self.command_info.function(*arglist) File "/usr/lib/python3.6/site-packages/crmsh/ui_history.py", line 151, in do_info return crm_report().info() File "/usr/lib/python3.6/site-packages/crmsh/history.py", line 756, in info if not self.prepare_source(): File "/usr/lib/python3.6/site-packages/crmsh/history.py", line 624, in prepare_source self.loc = self.manage_live_report(no_live_update=no_live_update) File "/usr/lib/python3.6/site-packages/crmsh/history.py", line 444, in manage_live_report rc = self.update_live_report(next_loglines, next_peinputs) File "/usr/lib/python3.6/site-packages/crmsh/history.py", line 390, in update_live_report rc1 = next_loglines(to_update, self.outdir, self.errdir, end_time) File "/usr/lib/python3.6/site-packages/crmsh/crm_pssh.py", line 159, in next_loglines statuses = do_pssh(l, opts) File "/usr/lib/python3.6/site-packages/crmsh/crm_pssh.py", line 110, in do_pssh return manager.run() # returns a list of exit codes File "/usr/lib/python3.6/site-packages/parallax/manager.py", line 102, in run writer.start() File "/usr/lib64/python3.6/threading.py", line 842, in start raise RuntimeError("threads can only be started once") RuntimeError: threads can only be started once node1:~ # ...

Not sure whether it is an expected behavior...

Any help is much appreciated.

liangxin1300 commented 1 year ago

Hi @akoma-2a , Please provide your crmsh version

akoma-2a commented 1 year ago

Hi Liangxing, Thank you for the reply.

Here below is the crmsh version installed: node2:~ # rpm -qa | grep -i crmsh crmsh-4.3.1+20221230.4c344416-150200.5.86.1.noarch crmsh-scripts-4.3.1+20221230.4c344416-150200.5.86.1.noarch node2:~ #

Thanks so much.

liangxin1300 commented 1 year ago

Hi @akoma-2a

Please try to apply this commit in https://github.com/krig/parallax/pull/20

Thank you!

akoma-2a commented 1 year ago

Hello Liangxing, The fix provided is working as expected.

Thank you so much for your help.

Have a great day.

Shpresim.