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.

Bug 1081243

Summary: pcs should use pipes instead of command line inputs internally
Product: Red Hat Enterprise Linux 7 Reporter: Jaroslav Kortus <jkortus>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: 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 Flags
[1/3] proposed fix
none
[2/3] proposed fix
none
[3/3] proposed fix
none
[3/3] proposed fix
none
proposed fix - deleteing a resource with a large number of options none

Description Jaroslav Kortus 2014-03-26 20:46:59 UTC
Description of problem:
If I create a very large group (let's say 200 filesystem resources) the pcs commands start failing.

# pcs -f /tmp/tmp.AZ33xBKmD1 resource group add fsgroup fs-156
Argument list too long
Error: unable to locate command: /usr/sbin/cibadmin

The reason is probably internal use of cibadmin -X while -x or -p options would probably do a better job in this regard.


Version-Release number of selected component (if applicable):
pcs-0.9.115-32.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. create 200+ resources
2. add them to one group via pcs resource group add <group> <resource>
3.

Actual results:
pcs fails with "Argument list too long"

Expected results:
pcs succeeds

Additional info:

Comment 3 Tomas Jelinek 2014-05-29 09:46:50 UTC
Created attachment 900306 [details]
[1/3] proposed fix

Comment 4 Tomas Jelinek 2014-05-29 09:47:15 UTC
Created attachment 900307 [details]
[2/3] proposed fix

Comment 5 Tomas Jelinek 2014-05-29 09:47:41 UTC
Created attachment 900308 [details]
[3/3] proposed fix

Comment 6 Tomas Jelinek 2014-05-29 10:00:39 UTC
Created attachment 900309 [details]
[3/3] proposed fix

Comment 7 Tomas Jelinek 2014-09-11 13:15:29 UTC
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

Comment 9 Tomas Jelinek 2014-11-26 14:28:10 UTC
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

Comment 10 Jaroslav Kortus 2015-01-14 18:18:57 UTC
[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.

Comment 12 errata-xmlrpc 2015-03-05 09:19:13 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, 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