Bug 671555

Summary: unable to create resolvable SRV records with dnsrecord-add
Product: [Retired] freeIPA Reporter: Michael Gregg <mgregg>
Component: ipa-admintoolsAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: benl, dpal, jhrozek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: freeipa-2.0.0-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 673227 (view as bug list) Environment:
Last Closed: 2012-03-28 09:26:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 673227    

Description Michael Gregg 2011-01-21 20:38:25 UTC
Description of problem:
I seem to be able to add SRV records to the database, but they do not seem to be resolvable by dig.

Version-Release number of selected component (if applicable):
ipa-server-2.0-0.2011011418gita68b2d2.fc14.x86_64

How reproducible:
always

Steps to Reproduce:
1. create zone ipa dnszone-add testzone
2. ipa dnsrecord-add testzone _http --srv-rec="why.go.here.com"
3. dig _http.testzone SRV
  
Actual results:
dig is unable to find any SRV records. 

Additional info:
I may be creating SRV records improperly, but I'm pretty sure that this is right.

Comment 1 Jakub Hrozek 2011-01-24 21:59:26 UTC
https://fedorahosted.org/freeipa/ticket/846

Comment 2 Jakub Hrozek 2011-01-26 14:13:18 UTC
After retesting, I see this is just a docs bug - the SRV resource records has a special format you need to add as RDATA, plus the name of the record must be in format _service._protocol. Here's what works for me (consider existing zone srvzone):

1) ipa dnsrecord-add srvzone _ldap._tcp --srv-rec="0 100 389 foo.example.com"
2) ipa dnsrecord-add srvzone _ldap._tcp --srv-rec="1 100 389 bar.example.com"
3) dig _ldap._tcp.srvzone SRV
;; ANSWER SECTION:
_ldap._tcp.srvzone.	86400	IN	SRV	1 100 389 bar.example.com.srvzone.
_ldap._tcp.srvzone.	86400	IN	SRV	0 100 389 foo.example.com.srvzone.

The format of RDATA is "priority weight port target". See RFC 2782 for a detailed explanation.

Comment 3 Dmitri Pal 2011-02-10 21:10:16 UTC
master: 682ca8658aa3b1c517848bc72e6531fea782ed07