URL: https://github.com/freeipa/freeipa/pull/5155 Author: tiran Title: #5155: [Backport][ipa-4-8] Pre-populate IP addresses for the name server upgrades Action: opened
PR body: """ This PR was opened automatically because PR #5153 was pushed to master and backport to ipa-4-8 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/5155/head:pr5155 git checkout pr5155
From 30bbae4b1ce46a44718614d8818fe63a41bcee46 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy <aboko...@redhat.com> Date: Sat, 26 Sep 2020 16:30:58 +0300 Subject: [PATCH] Pre-populate IP addresses for the name server upgrades Setting up resolv.conf in BIND instance expects IP addresses of the server to be provided. This is done wiht BindInstance.setup() method call. However, when reusing resolver setup during upgrade BIND instance has no IP addresses configured and fails with an assert in tasks.configure_dns_resolver(). Pass through the server's IP addresses during upgrade. Fixes: https://pagure.io/freeipa/issue/8518 Signed-off-by: Alexander Bokovoy <aboko...@redhat.com> --- ipaserver/install/server/upgrade.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py index 70279cf024..cb19c0433e 100644 --- a/ipaserver/install/server/upgrade.py +++ b/ipaserver/install/server/upgrade.py @@ -1402,6 +1402,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, []) + bind.ip_addresses = ip_addresses bind.setup_resolv_conf() logger.info("Updated systemd-resolved configuration")
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org