Bug 820012

Summary: host-add accepts --ip-address option without DNS installed
Product: Red Hat Enterprise Linux 7 Reporter: Rob Crittenden <rcritten>
Component: ipaAssignee: Martin Kosek <mkosek>
Status: CLOSED CURRENTRELEASE QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: jgalipea, mkosek
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: 2015-01-16 14:14:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rob Crittenden 2012-05-08 21:47:23 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/2729

host plugin accepts IP address passed to `host-add` command for an unresolvable host even when IPA is configured without DNS support and the IP address is obviously not used.

Current behavior:
{{{
# ipa host-add foo.example.com 
ipa: ERROR: Host does not have corresponding DNS A record

# ipa host-add foo.example.com --ip-address=10.0.0.1
----------------------------
Added host "foo.example.com"
----------------------------
  Host name: foo.example.com
  Principal name: host/foo.example.com.BOS.REDHAT.COM
  Password: False
  Keytab: False
  Managed by: foo.example.com
}}}

Previous behavior:
{{{
# ipa host-add foo.example.com
ipa: ERROR: Host does not have corresponding DNS A record

# ipa host-add foo.example.com --ip-address=10.0.0.1
ipa: ERROR: DNS zone example.com not found
}}}

Comment 1 Martin Kosek 2015-01-16 14:14:06 UTC
I checked this Bug with current IdM/FreeIPA (4.1) and the error was raised properly:

# ipa host-add foo.example.com 
ipa: ERROR: Host does not have corresponding DNS A/AAAA record

# ipa host-add foo.example.com --ip-address=10.0.0.1
ipa: ERROR: DNS zone example.com. not found

If you still reproduce the issue, please feel free to reopen this request.