Fixed. Updated patch attached.

On Wed, Dec 9, 2015 at 2:37 AM, Martin Basti <mba...@redhat.com> wrote:

> NACK
>
> Patch contains syntax error, missing brace
>
> ipaserver/install/server/replicainstall.py:850: [E0001(syntax-error), ]
> invalid syntax)
>
> Martin
>
>
> On 09.12.2015 07:08, Jan Cholasta wrote:
>
>> LGTM
>>
>> On 8.12.2015 17:04, Gabe Alford wrote:
>>
>>> Updated patch attached.
>>>
>>> On Tue, Dec 8, 2015 at 8:27 AM, Martin Basti <mba...@redhat.com
>>> <mailto:mba...@redhat.com>> wrote:
>>>
>>>
>>>
>>>     On 08.12.2015 16:26, Gabe Alford wrote:
>>>
>>>>     Just to confirm:
>>>>
>>>>     if server is installed:
>>>>          Let's stop here and not do anything else
>>>>
>>>>     if domain level 0:
>>>>          check if client installed and stop here
>>>>
>>>>     Right?
>>>>
>>>     yes
>>>
>>>
>>>
>>>>
>>>>     On Tue, Dec 8, 2015 at 8:20 AM, Jan Cholasta <jchol...@redhat.com
>>>>     <mailto:jchol...@redhat.com>> wrote:
>>>>
>>>>         On 8.12.2015 16:17, Martin Basti wrote:
>>>>
>>>>
>>>>
>>>>             On 08.12.2015 16:14, Jan Cholasta wrote:
>>>>
>>>>                 On 8.12.2015 16:09, Martin Basti wrote:
>>>>
>>>>
>>>>
>>>>                     On 01.12.2015 14:57, Gabe Alford wrote:
>>>>
>>>>                         Sorry guys, I forgot to add a meaningful
>>>>                         subject to this message.
>>>>                         Ignore the previous thread start.
>>>>
>>>>                         ---------- Forwarded message ----------
>>>>                         From: *Gabe Alford* <redhatri...@gmail.com
>>>>                         <mailto:redhatri...@gmail.com>
>>>>                         <mailto:redhatri...@gmail.com
>>>> <mailto:redhatri...@gmail.com>>>
>>>>                         Date: Mon, Nov 30, 2015 at 7:31 PM
>>>>                         Subject: [PATCH 0065]
>>>>                         To: freeipa-devel <freeipa-devel@redhat.com
>>>> <mailto:freeipa-devel@redhat.com>
>>>>                         <mailto:freeipa-devel@redhat.com
>>>> <mailto:freeipa-devel@redhat.com>>>
>>>>
>>>>
>>>>                         Hello,
>>>>
>>>>                         Patch fix for the following tickets:
>>>>
>>>> https://fedorahosted.org/freeipa/ticket/5022
>>>> https://fedorahosted.org/freeipa/ticket/5320
>>>>
>>>>                         Thanks,
>>>>
>>>>                         Gabe
>>>>
>>>>
>>>>
>>>>                     ACK
>>>>
>>>>
>>>>                 NACK, you can't install a server over an already
>>>>                 installed client,
>>>>                 thus the original check is correct.
>>>>
>>>>             Ahh domain level 0, right, but this check can be added
>>>>             before the client
>>>>             check.
>>>>
>>>>
>>>>         Yes.
>>>>
>>>>             With domain level 1, this check should stay there IMO.
>>>>
>>>>
>>>>         Yes. It should say "IPA server is already configured" rather
>>>>         than "IPA replica is already configured", though.
>>>>
>>>>         --
>>>>         Jan Cholasta
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
From 41af20d4ef76186f4099858e12e6e954d282f70f Mon Sep 17 00:00:00 2001
From: Gabe <redhatri...@gmail.com>
Date: Wed, 9 Dec 2015 06:41:30 -0700
Subject: [PATCH] ipa-replica-install prints incorrect error message when
 replica is already installed

https://fedorahosted.org/freeipa/ticket/5022
https://fedorahosted.org/freeipa/ticket/5320
---
 ipaserver/install/server/replicainstall.py | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py
index 4554166752ce4e5db2a98a8f495aa061aec963e9..1f4b133e1a11c915b229514456c8624148a741f1 100644
--- a/ipaserver/install/server/replicainstall.py
+++ b/ipaserver/install/server/replicainstall.py
@@ -31,9 +31,8 @@ from ipaserver.install import (
     bindinstance, ca, cainstance, certs, dns, dsinstance, httpinstance,
     installutils, kra, krainstance, krbinstance, memcacheinstance,
     ntpinstance, otpdinstance, custodiainstance, service)
-from ipaserver.install.installutils import create_replica_config
-from ipaserver.install.installutils import ReplicaConfig
-from ipaserver.install.installutils import load_pkcs12
+from ipaserver.install.installutils import (
+    create_replica_config, ReplicaConfig, load_pkcs12, is_ipa_configured)
 from ipaserver.install.replication import (
     ReplicationManager, replica_conn_check)
 import SSSDConfig
@@ -423,6 +422,11 @@ def install_check(installer):
 
     tasks.check_selinux_status()
 
+    if is_ipa_configured():
+        sys.exit("IPA server is already configured on this system.\n"
+                 "If you want to reinstall the IPA server, please uninstall "
+                 "it first using 'ipa-server-install --uninstall'.")
+
     client_fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
     if client_fstore.has_files():
         sys.exit("IPA client is already configured on this system.\n"
@@ -828,6 +832,11 @@ def promote_check(installer):
 
     tasks.check_selinux_status()
 
+    if is_ipa_configured():
+        sys.exit("IPA server is already configured on this system.\n"
+                 "If you want to reinstall the IPA server, please uninstall "
+                 "it first using 'ipa-server-install --uninstall'.")
+
     client_fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
     if not client_fstore.has_files():
         ensure_enrolled(installer)
-- 
1.8.3.1

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to