Bug 1081243
| Summary: | pcs should use pipes instead of command line inputs internally | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jaroslav Kortus <jkortus> | ||||||||||||
| Component: | pcs | Assignee: | Tomas Jelinek <tojeline> | ||||||||||||
| Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | ||||||||||||
| Severity: | medium | Docs Contact: | |||||||||||||
| Priority: | medium | ||||||||||||||
| Version: | 7.0 | CC: | cfeist, cluster-maint, fdinitto, jruemker, rsteiger | ||||||||||||
| Target Milestone: | rc | ||||||||||||||
| Target Release: | --- | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Fixed In Version: | pcs-0.9.137-1.el7 | Doc Type: | Bug Fix | ||||||||||||
| Doc Text: |
Cause:
pcs updates CIB using cibadmin tool like this:
cibadmin --xml-text updated_cib_xml
Consequence:
If length of the updated_cib_xml exceeds allowed command line length then update fails with "Argument list too long" error. This makes pcs unable to update CIB with large number of resources/constraints.
Fix:
Changed the CIB update using cibadmin tool like this:
cibadmin --xml-pipe
and pass the updated_cib_xml to cibadmin stdin.
Result:
pcs is able to update CIB with large number of resources/constraints.
|
Story Points: | --- | ||||||||||||
| Clone Of: | |||||||||||||||
| : | 1150662 (view as bug list) | Environment: | |||||||||||||
| Last Closed: | 2015-03-05 09:19:13 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
Jaroslav Kortus
2014-03-26 20:46:59 UTC
Created attachment 900306 [details]
[1/3] proposed fix
Created attachment 900307 [details]
[2/3] proposed fix
Created attachment 900308 [details]
[3/3] proposed fix
Created attachment 900309 [details]
[3/3] proposed fix
Before Fix:
[root@rh70-node1 ~]# rpm -q pcs
pcs-0.9.115-32.el7.x86_64
[root@rh70-node1 ~]# pcs cluster cib test.xml
[root@rh70-node1 ~]# for i in `seq 500`; do pcs -f test.xml resource create dummy-$i Dummy; done
[root@rh70-node1 ~]# pcs -f test.xml resource group add dummies dummy-1 dummy-2
Argument list too long
Error: unable to locate command: /usr/sbin/cibadmin
[root@rh70-node1 ~]# echo $?
1
After Fix:
[root@rh70-node1 ~]# rpm -q pcs
pcs-0.9.126-1.el7.x86_64
[root@rh70-node1 ~]# pcs cluster cib test.xml
[root@rh70-node1 ~]# for i in `seq 500`; do pcs -f test.xml resource create dummy-$i Dummy; done
[root@rh70-node1 ~]# pcs -f test.xml resource group add dummies dummy-1 dummy-2
[root@rh70-node1 ~]# pcs -f test.xml resource
{output trimmed}
dummy-499 (ocf::heartbeat:Dummy): Stopped
dummy-500 (ocf::heartbeat:Dummy): Stopped
Resource Group: dummies
dummy-1 (ocf::heartbeat:Dummy): Stopped
dummy-2 (ocf::heartbeat:Dummy): Stopped
Created attachment 961677 [details]
proposed fix - deleteing a resource with a large number of options
Before Fix:
[root@rh70-node1:~]# rpm -q pcs
pcs-0.9.126-1.el7.x86_64
[root@rh70-node1:~]# pcs resource create dummy Dummy
[root@rh70-node1:~]# pcs cluster cib test.xml
[root@rh70-node1:~]# for i in `seq 5000`; do pcs -f test.xml resource meta dummy foo-$i=bar-$i; done
[root@rh70-node1:~]# pcs -f test.xml resource group add dummies dummy
[root@rh70-node1:~]# pcs -f test.xml resource delete dummies
Removing group: dummies (and all resources within group)
Stopping all resources in group: dummies...
Deleting Resource (and group) - dummy
Argument list too long
Error: unable to locate command: /usr/sbin/cibadmin
[root@rh70-node1:~]# echo $?
1
After Fix:
[root@rh70-node1:~]# rpm -q pcs
pcs-0.9.137-1.el7.x86_64
[root@rh70-node2:~]# pcs resource create dummy Dummy
[root@rh70-node2:~]# pcs cluster cib test.xml
[root@rh70-node1:~]# for i in `seq 5000`; do pcs -f test.xml resource meta dummy foo-$i=bar-$i; done
[root@rh70-node1:~]# pcs -f test.xml resource group add dummies dummy
[root@rh70-node1:~]# pcs -f test.xml resource delete dummies
[root@rh70-node1:~]# pcs -f test.xml resource delete dummies
Removing group: dummies (and all resources within group)
Stopping all resources in group: dummies...
Deleting Resource (and group) - dummy
[root@rh70-node1:~]# echo $?
0
[root@virt-082 ~]# for i in `seq -w 1 300`; do echo "Creating $i"; pcs resource create dummy$i ocf:heartbeat:Dummy; done Creating 001 Creating 002 ... Creating 300 [root@virt-082 ~]# [root@virt-082 ~]# pcs status | grep dummy | wc -l 300 It took a while, but it succeeded. Verified with pcs-0.9.137-7.el7.x86_64. 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://rhn.redhat.com/errata/RHBA-2015-0415.html |