DNS Locations: require to restart named-pkcs11 affter location change

Send a warning message that named-pkcs11 service must be restarted after
changes related to locations or server weight

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
Martin Basti
2016-06-15 16:22:26 +02:00
parent ef12cad30b
commit 1997733cdf
2 changed files with 15 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ from .baseldap import (
from ipalib.request import context
from ipalib import _, ngettext
from ipalib import output
from ipaplatform import services
from ipapython.dn import DN
from ipapython.dnsutil import DNSName
from ipaserver.servroles import ENABLED
@@ -252,7 +253,11 @@ class server_mod(LDAPUpdate):
# server is not DNS server
pass
if 'ipalocation' or 'ipalocationweight' in entry_attrs:
if 'ipalocation_location' or 'ipalocationweight' in options:
self.add_message(messages.ServiceRestartRequired(
service=services.service('named').systemd_name,
server=keys[0], ))
result = self.api.Command.dns_update_system_records()
if not result.get('value'):
self.add_message(messages.AutomaticDNSRecordsUpdateFailed())