Bug 1419661
Summary: | pcs incorrectly recognizes parts of the resource agent name containing the systemd service instance | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Ivan Devat <idevat> | ||||
Component: | pcs | Assignee: | Ivan Devat <idevat> | ||||
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | 7.2 | CC: | cfeist, cluster-maint, idevat, omular, rsteiger, tojeline | ||||
Target Milestone: | rc | Keywords: | EasyFix | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | pcs-0.9.156-1.el7 | Doc Type: | Bug Fix | ||||
Doc Text: |
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.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2017-08-01 18:26:07 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Ivan Devat
2017-02-06 16:47:51 UTC
We should also take a look at ResourceAgent class in pcsd/resource.rb. Created attachment 1249034 [details]
proposed fix
Tests are in the patch.
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@ |