RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2210855 - 'pcs resource move' does not work
Summary: 'pcs resource move' does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: pcs
Version: 9.3
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 9.3
Assignee: Tomas Jelinek
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-29 18:36 UTC by Nina Hostakova
Modified: 2023-11-07 09:04 UTC (History)
8 users (show)

Fixed In Version: pcs-0.11.5-2.el9
Doc Type: No Doc Update
Doc Text:
The affected packages have not been released.
Clone Of:
Environment:
Last Closed: 2023-11-07 08:23:11 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-6722 0 None None None 2023-05-30 09:16:40 UTC
Red Hat Issue Tracker RHELPLAN-158465 0 None None None 2023-05-29 18:36:47 UTC
Red Hat Product Errata RHSA-2023:6316 0 None None None 2023-11-07 08:24:42 UTC

Description Nina Hostakova 2023-05-29 18:36:16 UTC
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'

Comment 2 Tomas Jelinek 2023-05-30 14:27:23 UTC
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

Comment 3 Michal Pospisil 2023-05-31 14:16:32 UTC
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'

Comment 10 errata-xmlrpc 2023-11-07 08:23:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: pcs security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:6316


Note You need to log in before you can comment on or make changes to this bug.