mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Simplify update code
resolve_ip_addresses_nss(host) is equivalent to get_server_ip_address(api.env.host, True, False, []). The function get_server_ip_address() is designed to perform interactive checks that should not be triggered in automatic upgrade code. Related: https://pagure.io/freeipa/issue/8275 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
@@ -1437,8 +1437,9 @@ def upgrade_bind(fstore):
|
||||
# resolve1's stub resolver config file.
|
||||
has_resolved_ipa_conf = os.path.isfile(paths.SYSTEMD_RESOLVED_IPA_CONF)
|
||||
if not has_resolved_ipa_conf and detect_resolve1_resolv_conf():
|
||||
ip_addresses = installutils.get_server_ip_address(
|
||||
api.env.host, True, False, [])
|
||||
ip_addresses = installutils.resolve_ip_addresses_nss(
|
||||
api.env.host
|
||||
)
|
||||
bind.ip_addresses = ip_addresses
|
||||
bind.setup_resolv_conf()
|
||||
logger.info("Updated systemd-resolved configuration")
|
||||
|
||||
Reference in New Issue
Block a user