ClusterLabs / PAF

PostgreSQL Automatic Failover: High-Availibility for Postgres, based on Pacemaker and Corosync.
http://clusterlabs.github.io/PAF/
Other
340 stars 55 forks source link

PAF, PostgreSQL 15 and Debian 12 #224

Closed SimBou closed 1 year ago

SimBou commented 1 year ago

When I try to move resource from one node to another, it fails with the following error :

pcs resource move --promote pgsqld-clone

Traceback (most recent call last): File "/usr/sbin/pcs", line 33, in sys.exit(load_entry_point('pcs==0.11.5', 'console_scripts', 'pcs')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pcs/app.py", line 273, in main routing.create_router(cmd_map, [])( File "/usr/lib/python3/dist-packages/pcs/cli/common/routing.py", line 33, in _router return cmd_map[sub_cmd](lib, argv_next, modifiers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pcs/cli/common/routing.py", line 33, in _router return cmd_map[sub_cmd](lib, argv_next, modifiers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pcs/resource.py", line 854, in resource_move lib.resource.move_autoclean( File "/usr/lib/python3/dist-packages/pcs/cli/common/lib_wrapper.py", line 95, in decorated_run return run_with_middleware(run, cli_env, *args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pcs/cli/common/middleware.py", line 14, in run return next_in_line(env, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pcs/cli/common/middleware.py", line 42, in apply result_of_next = next_in_line(env, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pcs/cli/common/middleware.py", line 80, in apply result_of_next = next_in_line(env, *args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pcs/cli/common/lib_wrapper.py", line 86, in run lib_call_result = run_library_command(lib_env, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pcs/lib/commands/resource.py", line 1823, in moveautoclean , move_transitions, after_move_simulated_cib = simulate_cib( ^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pcs/lib/pacemaker/live.py", line 426, in simulate_cib plaintext_result, transitions_xml, new_cib_xml = simulate_cib_xml( ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pcs/lib/pacemaker/live.py", line 387, in simulate_cib_xml with tools.get_tmp_file() as new_cib_file, tools.get_tmp_file() as transitions_file: ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/contextlib.py", line 289, in helper return _GeneratorContextManager(func, args, kwds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/contextlib.py", line 105, in init self.gen = func(args, kwds) ^^^^^^^^^^^^^^^^^^^ TypeError: get_tmp_file() missing 1 required positional argument: 'data'

CtrlZmaster commented 1 year ago

Thank you for the report. We are really sorry for the problems that this is causing, it is a regression in pcs resource move command. It is already fixed: https://bugzilla.redhat.com/show_bug.cgi?id=2210855

Since you are using Debian 12, the version of pcs in stable is 0.11.5 which is affected. Someone reported this bug in the Debian tracker before. It seems like they did not patch it, only rebased to 0.11.6 which is available in the testing repository.

As a workaround, either update pcs from the testing repository, or download the pcs package and install it manually until the fixed version gets into stable. You might also need to install pcs-snmp at the same time (not sure, I haven't tested it on Debian but on Fedora they are required to be the same version).

SimBou commented 1 year ago

Thank you for your answer, it perfectly work. Regards