[Freeipa-devel] [PATCH] 583 update DNS when adding/removing host

Rob Crittenden rcritten at redhat.com
Fri Nov 19 23:00:18 UTC 2010


Simo Sorce wrote:
> On Wed, 20 Oct 2010 10:26:08 -0400
> Rob Crittenden<rcritten at redhat.com>  wrote:
>
>> Add ability to add/remove DNS records when adding/removing a host
>> entry.
>>
>> A host in DNS must have an IP address so a valid IP address is
>> required when adding a host. The --force flag will be needed too
>> since you are adding a host that isn't in DNS.
>>
>> For IPv4 it will create an A and a PTR DNS record.
>>
>> IPv6 isn't quite supported yet. Some basic work in the DNS installer
>> is needed to get this working. Once the get_reverse_zone() returns
>> the right value then this should start working and create an AAAA
>> record and the appropriate reverse entry.
>>
>> When deleting a host with the --updatedns flag it will try to remove
>> all records it can find in the zone for this host.
>>
>> ticket 238
>>
>> rob
>
> NACK, this patch introduces a bug when trying to add the same host
> multiple time with different ip address.
> The second time the ipa host-ad will correctly return an error that the
> host already exist yet the A record with the new address is added in
> DNS. Adding records to the DNS should happen only after the host has
> been successfully created.
>
> Simo.
>

Ok, moved the dns_add into the post operation. It still does some amount 
of validation in the preop.

I added a failsafe so that if the host add is successful but the dns add 
fails it raises an error to that effect, it doesn't roll back all the 
changes.

rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-583-2-host.patch
Type: text/x-patch
Size: 11095 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20101119/1e2c193b/attachment.bin>


More information about the Freeipa-devel mailing list