Bug 970977 - ipa trust-add should provide clear error when defaultNamingContext not found
ipa trust-add should provide clear error when defaultNamingContext not found
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa (Show other bugs)
7.0
Unspecified Unspecified
medium Severity low
: rc
: 7.1
Assigned To: Martin Kosek
Namita Soman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-05 07:34 EDT by Marko Myllynen
Modified: 2015-09-23 10:30 EDT (History)
3 users (show)

See Also:
Fixed In Version: ipa-3.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 09:23:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marko Myllynen 2013-06-05 07:34:00 EDT
Description of problem:
When using ipa trust-add with, e.g., misconfigured DNS it might be that defaultNamingContext is not retrieved properly from the LDAP server. Currently an exception is thrown with a rather cryptic "ipa: ERROR: non-public: KeyError: 'defaultNamingContext'" message, it would be nice to have a more readable error being printed.

Version-Release number of selected component (if applicable):
RHEL 6.4
Comment 2 Martin Kosek 2013-06-05 08:05:29 EDT
Thanks, I can see the error in the code, I will open an upstream ticket.

Still, this is not a blocking issue, so I will move the bug to RHEL-7 product.
Comment 3 Martin Kosek 2013-06-05 08:09:24 EDT
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/3690
Comment 5 Martin Kosek 2013-09-03 10:34:25 EDT
Fixed upstream:

master: a3d489443c85629aa176df048c6b3505a7ee4586
ipa-3-3: c0dddb4d69bbd1015b6ce0476e6537b1e1448b0a
Comment 7 Steeve Goveas 2013-12-19 04:00:41 EST
What are the steps to reproduce the error?
Comment 8 Martin Kosek 2014-01-02 07:01:51 EST
Tomas, you worked on the solution, do you have some easy-to-use reproduction scenario?
Comment 9 Martin Kosek 2014-02-11 03:29:17 EST
I discussed this patch with Tomas. Given that it is just a very localized patch which adds better error reporting in a very specific case we cannot reliably reproduce, I would suggest testing as Sanity only (with general trust-add case).
Comment 10 Steeve Goveas 2014-02-11 06:08:45 EST
[root@dhcp207-151 ~]# echo Secret123 | ipa trust-add adtest.qe --type ad --admin administrator --password
--------------------------------------------------
Added Active Directory trust for realm "adtest.qe"
--------------------------------------------------
  Realm name: adtest.qe
  Domain NetBIOS name: ADTEST
  Domain Security Identifier: S-1-5-21-1910160501-511572375-3625658879
  SID blacklist incoming: S-1-0, S-1-1, S-1-2, S-1-3, S-1-5-1, S-1-5-2, S-1-5-3, S-1-5-4, S-1-5-5, S-1-5-6, S-1-5-7, S-1-5-8, S-1-5-9, S-1-5-10,
                          S-1-5-11, S-1-5-12, S-1-5-13, S-1-5-14, S-1-5-15, S-1-5-16, S-1-5-17, S-1-5-18, S-1-5-19, S-1-5-20
  SID blacklist outgoing: S-1-0, S-1-1, S-1-2, S-1-3, S-1-5-1, S-1-5-2, S-1-5-3, S-1-5-4, S-1-5-5, S-1-5-6, S-1-5-7, S-1-5-8, S-1-5-9, S-1-5-10,
                          S-1-5-11, S-1-5-12, S-1-5-13, S-1-5-14, S-1-5-15, S-1-5-16, S-1-5-17, S-1-5-18, S-1-5-19, S-1-5-20
  Trust direction: Two-way trust
  Trust type: Active Directory domain
  Trust status: Established and verified

[root@dhcp207-151 ~]# ipa trustdomain-find
Realm name: adtest.qe
  Domain name: adtest.qe
  Domain NetBIOS name: ADTEST
  Domain Security Identifier: S-1-5-21-1910160501-511572375-3625658879
  Domain enabled: True

  Domain name: pune.adtest.qe
  Domain NetBIOS name: PUNE
  Domain Security Identifier: S-1-5-21-91314187-2404433721-1858927112
  Domain enabled: True
----------------------------
Number of entries returned 2
----------------------------

[root@dhcp207-151 ~]# ipa idrange-find pune
---------------
1 range matched
---------------
  Range name: PUNE.ADTEST.QE_id_range
  First Posix ID of the range: 839000000
  Number of IDs in the range: 200000
  First RID of the corresponding RID range: 0
  Domain SID of the trusted domain: S-1-5-21-91314187-2404433721-1858927112
  Range type: Active Directory domain range
----------------------------
Number of entries returned 1
----------------------------

Verified in Version
[root@dhcp207-151 ~]# rpm -q ipa-server
ipa-server-3.3.3-17.el7.x86_64
Comment 11 Ludek Smid 2014-06-13 09:23:33 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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