pgreco / rpms / ipa

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

Blame SOURCES/0083-Add-the-force-join-option-to-replica-install.patch

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