ac7d03
From 8af160743817054289d1fff9aa904168e9606061 Mon Sep 17 00:00:00 2001
ac7d03
From: Stanislav Laznicka <slaznick@redhat.com>
ac7d03
Date: Wed, 5 Apr 2017 09:49:57 +0200
ac7d03
Subject: [PATCH] Add the force-join option to replica install
ac7d03
ac7d03
When installing client from inside replica installation on DL1,
ac7d03
it's possible that the client installation would fail and recommend
ac7d03
using --force-join option which is not available in replica installer.
ac7d03
Add the option there.
ac7d03
ac7d03
https://pagure.io/freeipa/issue/6183
ac7d03
ac7d03
Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
ac7d03
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
ac7d03
---
ac7d03
 ipaserver/install/server/__init__.py       | 2 +-
ac7d03
 ipaserver/install/server/replicainstall.py | 2 ++
ac7d03
 2 files changed, 3 insertions(+), 1 deletion(-)
ac7d03
ac7d03
diff --git a/ipaserver/install/server/__init__.py b/ipaserver/install/server/__init__.py
ac7d03
index 89444f21fefc902931b7ecfaba861a18ecc28dbe..028a4aa60feccf5af85f76d443dcb42b01684406 100644
ac7d03
--- a/ipaserver/install/server/__init__.py
ac7d03
+++ b/ipaserver/install/server/__init__.py
ac7d03
@@ -166,7 +166,6 @@ class ServerInstallInterface(ServerCertificateInstallInterface,
ac7d03
     """
ac7d03
     description = "Server"
ac7d03
 
ac7d03
-    force_join = False
ac7d03
     kinit_attempts = 1
ac7d03
     fixed_primary = True
ac7d03
     ntp_servers = None
ac7d03
@@ -526,6 +525,7 @@ class ServerMasterInstall(ServerMasterInstallInterface):
ac7d03
     Server master installer
ac7d03
     """
ac7d03
 
ac7d03
+    force_join = False
ac7d03
     servers = None
ac7d03
     no_wait_for_dns = True
ac7d03
     host_password = None
ac7d03
diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py
ac7d03
index b82d7b474640e24da7d978e9546ebd7a8e602c29..383932b39b9ee99a7a5ce3275a5a7e02581b85b7 100644
ac7d03
--- a/ipaserver/install/server/replicainstall.py
ac7d03
+++ b/ipaserver/install/server/replicainstall.py
ac7d03
@@ -935,6 +935,8 @@ def ensure_enrolled(installer):
ac7d03
             args.append("--no-sshd")
ac7d03
         if installer.mkhomedir:
ac7d03
             args.append("--mkhomedir")
ac7d03
+        if installer.force_join:
ac7d03
+            args.append("--force-join")
ac7d03
 
ac7d03
         ipautil.run(args, stdin=stdin, nolog=nolog, redirect_output=True)
ac7d03
         print()
ac7d03
-- 
ac7d03
2.12.2
ac7d03