[Debian-ha-maintainers] Bug#1042893: pcs: resource move fails

Rik Theys Rik.Theys at esat.kuleuven.be
Wed Aug 2 13:56:06 BST 2023


Source: pcs
Version: 0.11.5-1
Severity: important
Tags: upstream patch

Hi,

I've set up a pacemaker cluster using pcs on Debian 12. When trying to
move a resource from one node to the next, this fails with a python
error:

Traceback (most recent call last):              
  File "/usr/sbin/pcs", line 33, in <module>                                                     
    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 move_autoclean
    _, 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'


This seems to be a known regression: https://github.com/ClusterLabs/pcs/issues/696

A patch is available upstream: https://github.com/ClusterLabs/pcs/commit/2ab9e9c4fd1f26e5320c7585a83ba5d1857d4042


The patch looks very small and clean. Please apply the patch to the Debian 12 version.

Regards,
Rik



-- System Information:
Debian Release: 12.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-10-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled



More information about the Debian-ha-maintainers mailing list