Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Cause:
A resource agent name can contain systemd instance.
Pcs considers a colon in systemd instance as the delimiter the "provider" part from the "type" part.
The "provider" part is not allowed in the resource agent name when the "standard" part is "systemd".
Consequence:
Some pcs commands crash when the systemd instance with a colon is used in a resource agent name.
Fix:
Pcs does not consider a colon in systemd instance as the delimiter the "provider" part from the "type" part.
Result:
Pcs works well with the resource agent name that contains systemd instance with a colon.
Description of problem:
Pcs accepts a resource agent name in the format "standard:provider:type" when "standard" is 'ocf', or "standard:type" otherwise. However we can get for example the name "systemd:lvm2-pvscan@252:2", see:
[vm-rhel72-1 ~] $ crm_resource --list-agents systemd|grep @
lvm2-pvscan@252:2
But the second colon in the name "systemd:lvm2-pvscan@252:2" does not separate a provider and a type. If such resource agent name is used in "pcs resource create" it produces an invalid cib.
How reproducible:
always
Steps to Reproduce:
[vm-rhel72-1 ~] $ pcs resource create X systemd:lvm2-pvscan@252:2
Actual results:
Error: Unable to update cib
Call cib_replace failed (-203): Update does not conform to the configured schema
<cib
Expected results:
Success and
[vm-rhel72-1 ~] $ pcs cluster cib|grep 'primitive.*lvm2-pvscan' -A5
<primitive class="systemd" id="X" type="lvm2-pvscan@252:2">
<instance_attributes id="X-instance_attributes"/>
<operations>
<op id="X-monitor-interval-60s" interval="60s" name="monitor"/>
</operations>
</primitive>
Additional info:
In the current upstream version this bug is partially corrected and we get:
[vm-rhel72-1 ~] $ pcs resource create X systemd:lvm2-pvscan@252:2
Error: Invalid resource agent name 'systemd:lvm2-pvscan@252:2'. Use standard:provider:type when standard is 'ocf' or standard:type otherwise. List of standards and providers can be obtained by using commands 'pcs resource standards' and 'pcs resource providers'
Pcs validates the resource agent name and prevents to produce an invalid cib. But the behaviour is not correct. Moreover this validation is not correct and as a side effect it breaks the "pcs resource list" command.
[vm-rhel72-1 ~] $ pcs resource list systemd --nodesc
Traceback (most recent call last):
File "/root/pcs/pcs/pcs", line 12, in <module>
app.main(sys.argv[1:])
File "/root/pcs/pcs/app.py", line 191, in main
cmd_map[command](argv)
File "/root/pcs/pcs/resource.py", line 49, in resource_cmd
resource_list_available(lib, argv_next, modifiers)
File "/root/pcs/pcs/resource.py", line 214, in resource_list_available
agent_list = lib.resource_agent.list_agents(modifiers["describe"], search)
File "/root/pcs/pcs/cli/common/lib_wrapper.py", line 96, in decorated_run
return run_with_middleware(run, cli_env, *args, **kwargs)
File "/root/pcs/pcs/cli/common/middleware.py", line 20, in run
return next_in_line(env, *args, **kwargs)
File "/root/pcs/pcs/cli/common/lib_wrapper.py", line 86, in run
lib_call_result = run_library_command(lib_env, *args, **kwargs)
File "/root/pcs/pcs/lib/commands/resource_agent.py", line 75, in list_agents
resource_agent.ResourceAgent
File "/root/pcs/pcs/lib/commands/resource_agent.py", line 93, in _complete_agent_list
agent_metadata = metadata_class(runner, name)
File "/root/pcs/pcs/lib/resource_agent.py", line 637, in __init__
self._name_parts = self._prepare_name_parts(name)
File "/root/pcs/pcs/lib/resource_agent.py", line 703, in _prepare_name_parts
return get_resource_agent_name_from_string(name)
File "/root/pcs/pcs/lib/resource_agent.py", line 111, in get_resource_agent_name_from_string
raise InvalidResourceAgentName(full_agent_name)
pcs.lib.resource_agent.InvalidResourceAgentName
After Fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.156-1.el7.x86_64
[vm-rhel72-1 ~] $ crm_resource --list-agents systemd|grep @252:
lvm2-pvscan@252:2
> pcs resource list
[vm-rhel72-1 ~] $ pcs resource list systemd --nodesc|grep @252:
systemd:lvm2-pvscan@252:2
> resource create
[vm-rhel72-1 ~] $ pcs resource create R systemd:lvm2-pvscan@252:2
[vm-rhel72-1 ~] $ pcs cluster cib|grep 'primitive.*id="R"'
<primitive class="systemd" id="R" type="lvm2-pvscan@252:2">
> webui
Open web UI. Go to "RESOURCES" tab. Click "Add". In "Add Resource" dialog:
* There is only the "systemd" value in the combo "Class/Provider". There is not the value "systemd:lvm2-pvscan@252".
* Select the value "systemd" in the combo "Class/Provider". In the combo "Type" there is the value "lvm2-pvscan@252:2"
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, 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/RHBA-2017:1958
Please be aware that due to a pacemaker change via bz1382364 the 'pcs resource list' command will now only list service units, not service unit instances:
[root@virt-280 ~]# pcs resource list systemd:lvm2-pvscan@252:2
Error: No resource agents matching the filter.
Omitting the instance works as expected:
[root@virt-280 ~]# pcs resource list systemd:lvm2-pvscan@
systemd:lvm2-pvscan@ - systemd unit file for lvm2-pvscan@
[root@virt-280 ~]# pcs resource list systemd:lvm2-pvscan
systemd:lvm2-pvscan@ - systemd unit file for lvm2-pvscan@
Description of problem: Pcs accepts a resource agent name in the format "standard:provider:type" when "standard" is 'ocf', or "standard:type" otherwise. However we can get for example the name "systemd:lvm2-pvscan@252:2", see: [vm-rhel72-1 ~] $ crm_resource --list-agents systemd|grep @ lvm2-pvscan@252:2 But the second colon in the name "systemd:lvm2-pvscan@252:2" does not separate a provider and a type. If such resource agent name is used in "pcs resource create" it produces an invalid cib. How reproducible: always Steps to Reproduce: [vm-rhel72-1 ~] $ pcs resource create X systemd:lvm2-pvscan@252:2 Actual results: Error: Unable to update cib Call cib_replace failed (-203): Update does not conform to the configured schema <cib Expected results: Success and [vm-rhel72-1 ~] $ pcs cluster cib|grep 'primitive.*lvm2-pvscan' -A5 <primitive class="systemd" id="X" type="lvm2-pvscan@252:2"> <instance_attributes id="X-instance_attributes"/> <operations> <op id="X-monitor-interval-60s" interval="60s" name="monitor"/> </operations> </primitive> Additional info: In the current upstream version this bug is partially corrected and we get: [vm-rhel72-1 ~] $ pcs resource create X systemd:lvm2-pvscan@252:2 Error: Invalid resource agent name 'systemd:lvm2-pvscan@252:2'. Use standard:provider:type when standard is 'ocf' or standard:type otherwise. List of standards and providers can be obtained by using commands 'pcs resource standards' and 'pcs resource providers' Pcs validates the resource agent name and prevents to produce an invalid cib. But the behaviour is not correct. Moreover this validation is not correct and as a side effect it breaks the "pcs resource list" command. [vm-rhel72-1 ~] $ pcs resource list systemd --nodesc Traceback (most recent call last): File "/root/pcs/pcs/pcs", line 12, in <module> app.main(sys.argv[1:]) File "/root/pcs/pcs/app.py", line 191, in main cmd_map[command](argv) File "/root/pcs/pcs/resource.py", line 49, in resource_cmd resource_list_available(lib, argv_next, modifiers) File "/root/pcs/pcs/resource.py", line 214, in resource_list_available agent_list = lib.resource_agent.list_agents(modifiers["describe"], search) File "/root/pcs/pcs/cli/common/lib_wrapper.py", line 96, in decorated_run return run_with_middleware(run, cli_env, *args, **kwargs) File "/root/pcs/pcs/cli/common/middleware.py", line 20, in run return next_in_line(env, *args, **kwargs) File "/root/pcs/pcs/cli/common/lib_wrapper.py", line 86, in run lib_call_result = run_library_command(lib_env, *args, **kwargs) File "/root/pcs/pcs/lib/commands/resource_agent.py", line 75, in list_agents resource_agent.ResourceAgent File "/root/pcs/pcs/lib/commands/resource_agent.py", line 93, in _complete_agent_list agent_metadata = metadata_class(runner, name) File "/root/pcs/pcs/lib/resource_agent.py", line 637, in __init__ self._name_parts = self._prepare_name_parts(name) File "/root/pcs/pcs/lib/resource_agent.py", line 703, in _prepare_name_parts return get_resource_agent_name_from_string(name) File "/root/pcs/pcs/lib/resource_agent.py", line 111, in get_resource_agent_name_from_string raise InvalidResourceAgentName(full_agent_name) pcs.lib.resource_agent.InvalidResourceAgentName