Fixed A record creation bug

When creating an A record we used to provide full hostname as a record name,
while we should have provided only the first part of the hostname

https://fedorahosted.org/freeipa/ticket/5419

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Oleg Fayans 2015-11-02 16:02:35 +01:00 committed by Martin Basti
parent f9bbfade29
commit 511ace9a4f

View File

@ -886,10 +886,9 @@ def add_a_records_for_hosts_in_master_domain(master):
def add_a_record(master, host):
# Find out if the record is already there
cmd = master.run_command(['ipa',
'dnsrecord-find',
'dnsrecord-show',
master.domain.name,
host.hostname,
'--a-rec', host.ip],
host.hostname + "."],
raiseonerr=False)
# If not, add it
@ -897,7 +896,7 @@ def add_a_record(master, host):
master.run_command(['ipa',
'dnsrecord-add',
master.domain.name,
host.hostname,
host.hostname + ".",
'--a-rec', host.ip])