pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0011-Add-container-environment-check-to-replicainstall.patch

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