937546
From 734a39d52cf738bfce7ad97deab74f368387a83b Mon Sep 17 00:00:00 2001
937546
From: =?UTF-8?q?Tibor=20Dudl=C3=A1k?= <tdudlak@redhat.com>
937546
Date: Tue, 10 Sep 2019 18:54:53 +0200
937546
Subject: [PATCH] Add container environment check to replicainstall
937546
937546
Inside the container environment master's IP address
937546
does not resolve to its name.
937546
937546
Resolves: https://pagure.io/freeipa/issue/6210
937546
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
937546
---
937546
 ipaserver/install/server/replicainstall.py | 6 +++++-
937546
 1 file changed, 5 insertions(+), 1 deletion(-)
937546
937546
diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py
937546
index e13b7f18c4d4df7efde50ac9cb7d2f71bfa765cc..bd82a9d1483545d478e790a727e48eaa9ac22cfc 100644
937546
--- a/ipaserver/install/server/replicainstall.py
937546
+++ b/ipaserver/install/server/replicainstall.py
937546
@@ -1134,7 +1134,11 @@ def promote_check(installer):
937546
                            "certificate")
937546
 
937546
     installutils.verify_fqdn(config.host_name, options.no_host_dns)
937546
-    installutils.verify_fqdn(config.master_host_name, options.no_host_dns)
937546
+    # Inside the container environment master's IP address does not
937546
+    # resolve to its name. See https://pagure.io/freeipa/issue/6210
937546
+    container_environment = tasks.detect_container() is not None
937546
+    installutils.verify_fqdn(config.master_host_name, options.no_host_dns,
937546
+                             local_hostname=not container_environment)
937546
 
937546
     ccache = os.environ['KRB5CCNAME']
937546
     kinit_keytab('host/{env.host}@{env.realm}'.format(env=api.env),
937546
-- 
937546
2.20.1
937546