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 1266080

Summary: ipa trust-add --raw: ipa: ERROR: an internal error has occurred
Product: Red Hat Enterprise Linux 7 Reporter: Sudhir Menon <sumenon>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED DUPLICATE QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: mbabinsk, rcritten
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-21 15:25:17 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:

Description Sudhir Menon 2015-09-24 12:36:43 UTC
Description of problem: ipa trust-add --raw when used fails with ipa: ERROR: an internal error has occurred

Version-Release number of selected component (if applicable):


How reproducible:Always


Steps to Reproduce:
1. Install IPA server.
2. Add trust with the below option.

[root@ipa02 ~]# ipa trust-add --raw

Actual results:
Trust gets added but using the --raw option it gives below error.

[root@ipa02 ~]# ipa trust-add --raw
Realm name: TEST.IN
Active Directory domain administrator: Administrator
Active Directory domain administrator's password: 
ipa: ERROR: an internal error has occurred

[root@ipa02 ~]# ipa trust-show
Realm name: TEST.IN
  Realm name: test.in
  Domain NetBIOS name: TEST
  Domain Security Identifier: S-1-5-21-742749997-2996825573-4184801258
  Trust direction: Trusting forest
  Trust type: Active Directory domain

==> /var/log/httpd/error_log 

[Thu Sep 24 18:08:16.209243 2015] [:error] [pid 6340] ipa: ERROR: non-public: KeyError: 'ipanttrusttype'
[Thu Sep 24 18:08:16.209310 2015] [:error] [pid 6340] Traceback (most recent call last):
[Thu Sep 24 18:08:16.209314 2015] [:error] [pid 6340]   File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 347, in wsgi_execute
[Thu Sep 24 18:08:16.209317 2015] [:error] [pid 6340]     result = self.Command[name](*args, **options)
[Thu Sep 24 18:08:16.209325 2015] [:error] [pid 6340]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 443, in __call__
[Thu Sep 24 18:08:16.209331 2015] [:error] [pid 6340]     ret = self.run(*args, **options)
[Thu Sep 24 18:08:16.209334 2015] [:error] [pid 6340]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 760, in run
[Thu Sep 24 18:08:16.209336 2015] [:error] [pid 6340]     return self.execute(*args, **options)
[Thu Sep 24 18:08:16.209338 2015] [:error] [pid 6340]   File "/usr/lib/python2.7/site-packages/ipalib/plugins/trust.py", line 676, in execute
[Thu Sep 24 18:08:16.209340 2015] [:error] [pid 6340]     result['result']['ipanttrusttype'][0])]
[Thu Sep 24 18:08:16.209342 2015] [:error] [pid 6340] KeyError: 'ipanttrusttype'
[Thu Sep 24 18:08:16.209744 2015] [:error] [pid 6340] ipa: INFO: [jsonserver_session] admin: trust_add(u'TEST.IN', trust_type=u'ad', realm_admin=u'Administrator', realm_passwd=u'********', all=False, raw=True, version=u'2.156'): KeyError

Expected results: Error displayed on console should be fixed.

Additional info:

Comment 2 Sudhir Menon 2015-09-24 12:39:09 UTC
**** Note: ipa trust-add --all works without any error.

[root@ipa02 ~]# ipa trust-add --all
Realm name: TEST.IN
Active Directory domain administrator: Administrator
Active Directory domain administrator's password: 
------------------------------------------------
Added Active Directory trust for realm "test.in"
------------------------------------------------
  dn: cn=test.in,cn=ad,cn=trusts,dc=labs02,dc=test
  Realm name: test.in
  Domain NetBIOS name: TEST
  Domain Security Identifier: S-1-5-21-742749997-2996825573-4184801258
  SID blacklist incoming: S-1-5-20, S-1-5-3, S-1-5-2, S-1-5-1, S-1-5-7, S-1-5-6, S-1-5-5, S-1-5-4, S-1-5-9, S-1-5-8, S-1-5-17,
                          S-1-5-16, S-1-5-15, S-1-5-14, S-1-5-13, S-1-5-12, S-1-5-11, S-1-5-10, S-1-3, S-1-2, S-1-1, S-1-0, S-1-5-19,
                          S-1-5-18
  SID blacklist outgoing: S-1-5-20, S-1-5-3, S-1-5-2, S-1-5-1, S-1-5-7, S-1-5-6, S-1-5-5, S-1-5-4, S-1-5-9, S-1-5-8, S-1-5-17,
                          S-1-5-16, S-1-5-15, S-1-5-14, S-1-5-13, S-1-5-12, S-1-5-11, S-1-5-10, S-1-3, S-1-2, S-1-1, S-1-0, S-1-5-19,
                          S-1-5-18
  Trust direction: Trusting forest
  Trust type: Active Directory domain
  Trust status: Established and verified
  ipantsecurityidentifier: S-1-5-21-3175560007-1962822224-4064991556-1030
  ipantsupportedencryptiontypes: 28
  ipanttrustattributes: 8
  ipanttrustdirection: 1
  ipanttrustpartner: test.in
  ipanttrustposixoffset: 0
  ipanttrusttype: 2
  objectclass: top, ipaNTTrustedDomain, ipaIDobject
  uidnumber: 525400030

Comment 3 Tomas Babej 2015-09-24 13:37:00 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/5325

Comment 4 Martin Babinsky 2016-09-21 15:25:17 UTC

*** This bug has been marked as a duplicate of bug 1354381 ***