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.
Description of problem: Need to have validation for idrange name
Version-Release number of selected component (if applicable):
ipa-server-4.4.0-12.el7.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Ensure two-way trust is added with IPA server
2. Now run the below command with empty domain name.
#ipa idrange-add _id_range2 --dom-name= --rid-base=200000 --base-id=55 --range-size=5
3. Check the message on the console
Actual results:
[root@master]# ipa idrange-add _id_range2 --dom-name= --rid-base=200000 --base-id=55 --range-size=5
ipa: ERROR: an internal error has occurred
error_log
[Wed Oct 05 20:44:44.789504 2016] [:error] [pid 30073] File "/usr/lib/python2.7/site-packages/ipaserver/plugins/idrange.py", line 421, in pre_callback
[Wed Oct 05 20:44:44.789506 2016] [:error] [pid 30073] options['ipanttrusteddomainname'])
[Wed Oct 05 20:44:44.789509 2016] [:error] [pid 30073] File "/usr/lib/python2.7/site-packages/ipaserver/plugins/idrange.py", line 354, in get_trusted_domain_sid_from_name
[Wed Oct 05 20:44:44.789519 2016] [:error] [pid 30073] sid = domain_validator.get_sid_from_domain_name(name)
[Wed Oct 05 20:44:44.789522 2016] [:error] [pid 30073] File "/usr/lib/python2.7/site-packages/ipaserver/dcerpc.py", line 342, in get_sid_from_domain_name
[Wed Oct 05 20:44:44.789525 2016] [:error] [pid 30073] if name in domains:
[Wed Oct 05 20:44:44.789527 2016] [:error] [pid 30073] File "/usr/lib/python2.7/site-packages/ipapython/ipautil.py", line 671, in __contains__
[Wed Oct 05 20:44:44.789530 2016] [:error] [pid 30073] return super(CIDict, self).__contains__(key.lower())
[Wed Oct 05 20:44:44.789532 2016] [:error] [pid 30073] AttributeError: 'NoneType' object has no attribute 'lower'
[Wed Oct 05 20:44:44.789938 2016] [:error] [pid 30073] ipa: INFO: [jsonserver_session] admin: idrange_add/1(u'_id_range2', ipabaseid=55, ipaidrangesize=5, ipabaserid=200000, ipanttrusteddomainname=None, version=u'2.213'): AttributeError
Expected results:
Internal error should be fixed.
Additional info:
Internal error is no more displayed.
Tested on RHEL7.4 using
ipa-server-4.5.0-11.el7.x86_64
389-ds-base-1.3.6.1-13.el7.x86_64
pki-ca-10.4.1-4.el7.noarch
krb5-server-1.15.1-8.el7.x86_64
sssd-1.15.2-29.el7.x86_64
[root@master yum.repos.d]# ipa idrange-add _id_range2 --dom-name= --rid-base=200000 --base-id=55 --range-size=5
ipa: ERROR: invalid 'ID Range setup': Options secondary-rid-base and rid-base must be used together
[Mon May 15 09:04:04.426808 2017] [:error] [pid 27778] ipa: INFO: [jsonserver_session] admin: idrange_add/1(u'_id_range2', ipabaseid=55, ipaidrangesize=5, ipabaserid=200000, ipanttrusteddomainname=None, version=u'2.224'): ValidationError
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:2304