Description of problem: Moving a resource (in constraint autodelete mode)ends up with the traceback shown below Version-Release number of selected component (if applicable): pcs-0.11.5-1.el9.x86_64 How reproducible: always Steps to Reproduce: 1.# pcs resource * d (ocf:pacemaker:Dummy): Started virt-281 2.# pcs resource move d Traceback (most recent call last): File "/usr/sbin/pcs", line 33, in <module> sys.exit(load_entry_point('pcs==0.11.5+3e479bdb', 'console_scripts', 'pcs')()) File "/usr/lib/python3.9/site-packages/pcs/app.py", line 271, in main routing.create_router(cmd_map, [])( File "/usr/lib/python3.9/site-packages/pcs/cli/common/routing.py", line 33, in _router return cmd_map[sub_cmd](lib, argv_next, modifiers) File "/usr/lib/python3.9/site-packages/pcs/cli/common/routing.py", line 33, in _router return cmd_map[sub_cmd](lib, argv_next, modifiers) File "/usr/lib/python3.9/site-packages/pcs/resource.py", line 849, in resource_move lib.resource.move_autoclean( File "/usr/lib/python3.9/site-packages/pcs/cli/common/lib_wrapper.py", line 89, in decorated_run return run_with_middleware(run, cli_env, *args, **kwargs) File "/usr/lib/python3.9/site-packages/pcs/cli/common/middleware.py", line 14, in run return next_in_line(env, *args, **kwargs) File "/usr/lib/python3.9/site-packages/pcs/cli/common/middleware.py", line 42, in apply result_of_next = next_in_line(env, *args, **kwargs) File "/usr/lib/python3.9/site-packages/pcs/cli/common/middleware.py", line 80, in apply result_of_next = next_in_line(env, *args, **kwargs) File "/usr/lib/python3.9/site-packages/pcs/cli/common/lib_wrapper.py", line 80, in run lib_call_result = run_library_command(lib_env, *args, **kwargs) File "/usr/lib/python3.9/site-packages/pcs/lib/commands/resource.py", line 1823, in move_autoclean _, move_transitions, after_move_simulated_cib = simulate_cib( File "/usr/lib/python3.9/site-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.9/site-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/lib64/python3.9/contextlib.py", line 263, in helper return _GeneratorContextManager(func, args, kwds) File "/usr/lib64/python3.9/contextlib.py", line 87, in __init__ self.gen = func(*args, **kwds) TypeError: get_tmp_file() missing 1 required positional argument: 'data'
Upstream patch: https://github.com/ClusterLabs/pcs/commit/2ab9e9c4fd1f26e5320c7585a83ba5d1857d4042 Test: # pcs resource * d1 (ocf:pacemaker:Dummy): Started rh92-node1 # pcs resource move d1 Location constraint to move resource 'd1' has been created Waiting for the cluster to apply configuration changes... Location constraint created to move resource 'd1' has been removed Waiting for the cluster to apply configuration changes... resource 'd1' is running on node 'rh92-node2' # echo $? 0 # pcs resource * d1 (ocf:pacemaker:Dummy): Started rh92-node2
DevTestResults: [root@r09-03-b ~]# pcs resource move r1 r09-03-b.vm Location constraint to move resource 'r1' has been created Waiting for the cluster to apply configuration changes... Location constraint created to move resource 'r1' has been removed Waiting for the cluster to apply configuration changes... resource 'r1' is running on node 'r09-03-b.vm'