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 - pcs should use pipes instead of command line inputs internally
Summary: pcs should use pipes instead of command line inputs internally
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-26 20:46 UTC by Jaroslav Kortus
Modified: 2015-03-05 09:19 UTC (History)
5 users (show)

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.
Clone Of:
: 1150662 (view as bug list)
Environment:
Last Closed: 2015-03-05 09:19:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
[1/3] proposed fix (171.91 KB, patch)
2014-05-29 09:46 UTC, Tomas Jelinek
no flags Details | Diff
[2/3] proposed fix (186.77 KB, patch)
2014-05-29 09:47 UTC, Tomas Jelinek
no flags Details | Diff
[3/3] proposed fix (1.39 KB, patch)
2014-05-29 09:47 UTC, Tomas Jelinek
no flags Details | Diff
[3/3] proposed fix (1.40 KB, patch)
2014-05-29 10:00 UTC, Tomas Jelinek
no flags Details | Diff
proposed fix - deleteing a resource with a large number of options (352.44 KB, patch)
2014-11-26 14:28 UTC, Tomas Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1223273 0 None None None Never
Red Hat Product Errata RHBA-2015:0415 0 normal SHIPPED_LIVE pcs bug fix and enhancement update 2015-03-05 14:16:41 UTC

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


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