#5389 One way AD trust - wrong error message when deleting/disabling nonexistent domain
Closed: Fixed Opened by lryznaro.

Environment: Fedora 22 + Win 2012 AD

**
Setup:**

  • FreeIPA 4.2 with trust package installed from master
  • kinit as admin
  • trust named "nonexistent.com" does not exist

Steps to reproduce:

$ ipa trustdomain-del nonexistent.com

Domain name: nonexistent.com

**
Expected result:**

ipa: ERROR: nonexistent.com: trust not found

Actual result:

ipa: ERROR: invalid 'domain': cannot delete root domain of the trust, use trust-del to delete the trust itself

Note: same issue with "ipa trustdomain-disable" and "ipa trustdomain-enable" command


I am not able to reproduce this:

$ ipa trustdomain-del nonexsistent.com
Domain name: nonexistent.com
ipa: ERROR: nonexsistent.com: trust not found
$ ipa trust-find
----------------
0 trusts matched
----------------
----------------------------
Number of entries returned 0
----------------------------

master:

  • e89ddf27aa48458cc3db8ca8b8a066ae73248555 trusts: Make trust_show.get_dn raise properly formatted NotFound
  • 8d291c6467961d40d8b1bc9d83c8884d40c42685 trustdomain: Perform validation of the trust domain first

master:

  • 4d0d5913dd2e86dabbe9592522298c42af648284 trusts: Make trust_show.get_dn raise properly formatted NotFound
  • c6a558c30eeac571323010c416798c8ebe7004fb trustdomain: Perform validation of the trust domain first

ipa-4-2:

  • d0911de4e1f38d50a4e771b61269bd2e82d4ffdb trusts: Make trust_show.get_dn raise properly formatted NotFound
  • b0aea244592f15974ce76151c772e6dcb5668c83 trustdomain: Perform validation of the trust domain first

Metadata Update from @lryznaro:
- Issue assigned to tbabej
- Issue set to the milestone: FreeIPA 4.2.3

Metadata