Bug 714238 - --sizelimit unhelpful error with *-find commands
Summary: --sizelimit unhelpful error with *-find commands
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.1
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On: 643182
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-17 16:48 UTC by Jenny Severance
Modified: 2015-01-04 23:49 UTC (History)
5 users (show)

Fixed In Version: ipa-2.1.0-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: The error message when setting an integer value too large on 64-bit systems is confusing. Consequence: The maximum value allowed is not clear. Fix: Limit integer values to 2147483647 on all platforms. Result: Consistent error messages on 32 and 64-bit systems.
Clone Of: 643182
Environment:
Last Closed: 2011-12-06 18:34:08 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1533 normal SHIPPED_LIVE Moderate: ipa security and bug fix update 2011-12-06 01:23:31 UTC

Description Jenny Severance 2011-06-17 16:48:34 UTC
+++ This bug was initially created as a clone of Bug #643182 +++

Description of problem:

If sizelimit is over the integer size allow, it returns a cryptic message to the admin user ...

[root@dhcp-100-3-186 ipa-hostgroup-cli]# ipa hostgroup-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': need a <type 'int'>; got 20000000000L (a <type 'long'>)
[root@dhcp-100-3-186 ipa-hostgroup-cli]# ipa group-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': need a <type 'int'>; got 20000000000L (a <type 'long'>)



Version-Release number of selected component (if applicable):
ipa-server-1.91-0.2010101321git19272e5.fc12.i686

How reproducible:
always

Steps to Reproduce:
1. see description
2.
3.
  
Actual results:
cryptic error message

Expected results:
user friendly error message

Additional info:

--- Additional comment from dpal@redhat.com on 2010-12-10 17:15:28 EST ---

https://fedorahosted.org/freeipa/ticket/614

--- Additional comment from rcritten@redhat.com on 2011-02-07 12:47:46 EST ---

This was fixed as a side-effect of adding a default max value to integer type options. The new error is a more reasonable:

ipa: ERROR: invalid 'sizelimit': can be at most 2147483647

master: 886e417fd76b25a28cde70be8de2851047ed0338

--- Additional comment from jgalipea@redhat.com on 2011-06-10 13:08:57 EDT ---

# ipa user-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': can be at most 2147483647


# rpm -qi ipa-server
Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.0.0                             Vendor: Red Hat, Inc.
Release     : 23.el6                        Build Date: Wed 20 Apr 2011 09:57:13 AM EDT
Install Date: Thu 19 May 2011 12:47:52 PM EDT      Build Host: x86-003.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.0.0-23.el6.src.rpm
Size        : 2565882                          License: GPLv3+
Signature   : RSA/8, Thu 21 Apr 2011 03:48:25 PM EDT, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.freeipa.org/
Summary     : The IPA authentication server
Description :
IPA is an integrated solution to provide centrally managed Identity (machine,
user, virtual machines, groups, authentication credentials), Policy
(configuration settings, access control information) and Audit (events,
logs, analysis thereof). If you are installing an IPA server you need
to install this package (in other words, most people should NOT install
this package).

Automated regression test exists.

Comment 1 Jenny Severance 2011-06-17 16:54:30 UTC
Regression found - and this is causing automation tests to abort after failure:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-user-cli-add-033: size limit too large - bugzilla 643182
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [11:39:19] ::  Executing: ipa user-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': need a <type 'int'>; got 20000000000L (a <type 'long'>)
:: [11:39:21] ::  "ipa user-find --sizelimit=20000000000" failed as expected.
:: [11:39:23] ::  ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'sizelimit': need a <type 'int'>; got 20000000000L (a <type 'long'>)  EXP: ipa: ERROR: invalid 'sizelimit': can be at most 2147483647
:: [   FAIL   ] :: Verify expected error message - size limit too large. (Expected 0, got 1)

Additional observation:

I see in /var/log/messages ...


Jun 17 11:40:24 ipaqavmh python: abrt: detected unhandled Python exception in /usr/bin/beakerlib-journalling
Jun 17 11:40:24 ipaqavmh abrtd: dumpsocket: New client connected
Jun 17 11:40:24 ipaqavmh abrtd: dumpsocket: Saved Python crash dump of pid 4914 to /var/spool/abrt/pyhook-1308325224-4914
Jun 17 11:40:24 ipaqavmh abrtd: dumpsocket: Socket client disconnected
Jun 17 11:40:24 ipaqavmh abrtd: Directory 'pyhook-1308325224-4914' creation detected
Jun 17 11:40:24 ipaqavmh abrtd: New crash /var/spool/abrt/pyhook-1308325224-4914, processing
Jun 17 11:40:24 ipaqavmh python: abrt: detected unhandled Python exception in /usr/bin/beakerlib-journalling


version:
ipa-server-2.0.99-1.20110616T2130zgitdbeae4e.el6.x86_64

Comment 2 Dmitri Pal 2011-06-17 18:13:16 UTC
https://fedorahosted.org/freeipa/ticket/1346 <- for the sizelimit part.

Comment 3 Martin Kosek 2011-07-12 09:34:07 UTC
I wasn't able to reproduce this issue. The problem seems to be fixed in both nightly build (ipa-server-2.0.99-3.20110711T0524zgit30492ef.el6.x86_64) and current RHEL version (ipa-server-2.0.0-25.el6.x86_64).

Both shown correct output:

# ipa user-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': can be at most 2147483647

Comment 4 Jenny Severance 2011-07-12 12:10:46 UTC
This is not failing on x86_64:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-user-cli-add-033: size limit too large - bugzilla 643182
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa user-find --sizelimit=20000000000
:: [   LOG    ] :: "ipa user-find --sizelimit=20000000000" failed as expected.
:: [   LOG    ] :: Error message as expected: ipa: ERROR: invalid 'sizelimit': can be at most 2147483647
:: [   PASS   ] :: Verify expected error message - size limit too large.
:: [   LOG    ] :: Duration: 3s
:: [   LOG    ] :: Assertions: 1 good, 0 bad
:: [   PASS   ] :: RESULT: ipa-user-cli-add-033: size limit too large - bugzilla 643182


But is on i386:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-user-cli-add-033: size limit too large - bugzilla 643182
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa user-find --sizelimit=20000000000
:: [   LOG    ] :: "ipa user-find --sizelimit=20000000000" failed as expected.
:: [   LOG    ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'sizelimit': need a <type 'int'>; got 20000000000L (a <type 'long'>)  EXP: ipa: ERROR: invalid 'sizelimit': can be at most 2147483647
:: [   FAIL   ] :: Verify expected error message - size limit too large. (Expected 0, got 1)
:: [   LOG    ] :: Duration: 4s
:: [   LOG    ] :: Assertions: 0 good, 1 bad
:: [   FAIL   ] :: RESULT: ipa-user-cli-add-033: size limit too large - bugzilla 643182

Comment 8 Rob Crittenden 2011-10-31 20:13:23 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: The error message when setting an integer value too large on 64-bit systems is confusing.
Consequence: The maximum value allowed is not clear.
Fix: Limit integer values to 2147483647 on all platforms.
Result: Consistent error messages on 32 and 64-bit systems.

Comment 9 Gowrishankar Rajaiyan 2011-11-03 07:03:24 UTC
Arch: x86_64
[root@decepticons ~]#  ipa hostgroup-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': can be at most 2147483647
[root@decepticons ~]# 

[root@decepticons ~]#  ipa group-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': can be at most 2147483647
[root@decepticons ~]# 

[root@decepticons ~]#  ipa user-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': can be at most 2147483647
[root@decepticons ~]# 

[root@decepticons ~]#  ipa netgroup-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': can be at most 2147483647
[root@decepticons ~]# 


Arch: i386
[root@qe-blade-12 ~]# ipa hostgroup-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': can be at most 2147483647
[root@qe-blade-12 ~]# 

[root@qe-blade-12 ~]# ipa group-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': can be at most 2147483647
[root@qe-blade-12 ~]# 

[root@qe-blade-12 ~]# ipa user-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': can be at most 2147483647
[root@qe-blade-12 ~]#

[root@qe-blade-12 ~]# ipa netgroup-find --sizelimit=20000000000
ipa: ERROR: invalid 'sizelimit': can be at most 2147483647
[root@qe-blade-12 ~]#

Verified in version:

Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.1.3                             Vendor: Red Hat, Inc.
Release     : 8.el6                         Build Date: Tue 01 Nov 2011 05:50:44 PM EDT
Install Date: Thu 03 Nov 2011 02:54:36 AM EDT      Build Host: x86-004.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.1.3-8.el6.src.rpm
Size        : 3363441                          License: GPLv3+
Signature   : (none)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.freeipa.org/
Summary     : The IPA authentication server

Comment 10 errata-xmlrpc 2011-12-06 18:34:08 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.

http://rhn.redhat.com/errata/RHSA-2011-1533.html


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