fix: always compute rh_fqdn
This commit is contained in:
parent
0c425e1411
commit
ceb016ab9b
@ -400,11 +400,11 @@ def _on_update_success(host, fqdn, kind, ipaddr, secure, logger):
|
|||||||
netmask = host.netmask_ipv6
|
netmask = host.netmask_ipv6
|
||||||
_delete = not ifid # leave ifid empty if you don't want this rh record
|
_delete = not ifid # leave ifid empty if you don't want this rh record
|
||||||
try:
|
try:
|
||||||
|
rh_fqdn = FQDN(rh.name + '.' + fqdn.host, fqdn.domain)
|
||||||
if not _delete:
|
if not _delete:
|
||||||
ifid = IPAddress(ifid)
|
ifid = IPAddress(ifid)
|
||||||
network = IPNetwork("%s/%d" % (ipaddr, netmask))
|
network = IPNetwork("%s/%d" % (ipaddr, netmask))
|
||||||
rh_ipaddr = str(IPAddress(network.network) + int(ifid))
|
rh_ipaddr = str(IPAddress(network.network) + int(ifid))
|
||||||
rh_fqdn = FQDN(rh.name + '.' + fqdn.host, fqdn.domain)
|
|
||||||
except (IndexError, AddrFormatError) as e:
|
except (IndexError, AddrFormatError) as e:
|
||||||
logger.warning("trouble computing address of related host %s [%s]" % (rh, e))
|
logger.warning("trouble computing address of related host %s [%s]" % (rh, e))
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user