Re: [Freeipa-devel] [PATCH 0057] Warn in no installation found when running ipa-server-install --uninstall

2015-10-22 Thread Martin Basti



On 22.10.2015 01:28, Gabe Alford wrote:

Thanks Martin^2. Updated patched attached.

On Wed, Oct 21, 2015 at 2:46 AM, Martin Basti > wrote:




On 20.10.2015 05:17, Gabe Alford wrote:

Bump for re-review.


Hello,

thank your for your patch, the patch LGTM, but please use print()
as function to be python2/3 compatible

Martin^2



On Tue, Oct 13, 2015 at 7:15 AM, Gabe Alford
> wrote:

No worries Petr. All a part of the review process.

I have attached an updated patch that prints only a warning
message.

thanks,

Gabe

On Tue, Oct 13, 2015 at 12:39 AM, Petr Spacek
> wrote:

Hello Gabe,

I would like to apologize for the confusion regarding
this patch and the
repeated reworking.

Unfortunately Honza's position is not mentioned in the
ticket so you could not
know what to do, but Honza is our "installer architect"
so he has final say.

Petr^2 Spacek

On 13.10.2015  08:31, Jan Cholasta wrote:
> Hi,
>
> I don't think this is the correct approach. We are
aiming to have idempotent
> installers, which means that running uninstall on a
system without IPA
> installed should be a no-op. This is the current
behavior, so your patch is
> actually moving us back.
>
> The proper fix would be to *remove* the check from
install (as opposed to
> adding it to uninstall), but this requires the install
code to be idempotent,
> and we're not there yet.
>
> I'm OK with making this a warning, but don't make it a
fatal error and/or
> require --force.
>
> Honza
>
> On 12.10.2015 17:12, Gabe Alford wrote:
>> Thanks, Petr. Updated patch attached.
>>
>> Gabe
>>
>> On Mon, Oct 12, 2015 at 12:47 AM, Petr Spacek

>> >> wrote:
>>
>> Hello Gabe,
>>
>> thank you for your patch!
>>
>> Please note that there might be a case where detection
>>  is_ipa_configured() is
>> broken but the user still needs to run the
uninstall process to
>> clean it up.
>>
>> Could you amend the patch to respect --force
option? In that case the
>> detection should be skipped.
>>
>> Thank you for your time!
>>
>> Petr^2 Spacek
>>
>> On 9.10.2015 19:17, Gabe Alford wrote:
>>  > diff --git a/ipaserver/install/server/install.py
>>  b/ipaserver/install/server/install.py
>>  > index
>>
>>

13a59a0e6149dc22ded4a895db02516e9360e02b..ca93e7a6fd7276d9c0d82eb6f94575730759d858
>>
>> 100644
>>  > --- a/ipaserver/install/server/install.py
>>  > +++ b/ipaserver/install/server/install.py
>>  > @@ -954,6 +954,12 @@ def
uninstall_check(installer):
>>  >
>>  > installer._installation_cleanup = False
>>  >
>>  > +   if not is_ipa_configured():
>>  > +   print("IPA server is not configured on
this system.\n" +
>>  > + "If you want to install the IPA
server, please
>> install " +
>>  > + "it using 'ipa-server-install'.")
>>  > +   sys.exit(1)
>>  > +
>>  >   fstore =
sysrestore.FileStore(SYSRESTORE_DIR_PATH)
>>  >   sstore =
sysrestore.StateFile(SYSRESTORE_DIR_PATH)









ACK

Pushed to:
master: a0b8415236addf0ff32b9e05b2491d626d483171
ipa-4-2: 85dc0c2e3a396ff7d8d429a414b717cc01231b26

-- 
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

Re: [Freeipa-devel] [PATCH 0057] Warn in no installation found when running ipa-server-install --uninstall

2015-10-21 Thread Gabe Alford
Thanks Martin^2. Updated patched attached.

On Wed, Oct 21, 2015 at 2:46 AM, Martin Basti  wrote:

>
>
> On 20.10.2015 05:17, Gabe Alford wrote:
>
> Bump for re-review.
>
>
> Hello,
>
> thank your for your patch, the patch LGTM, but please use print() as
> function to be python2/3 compatible
>
> Martin^2
>
>
> On Tue, Oct 13, 2015 at 7:15 AM, Gabe Alford 
> wrote:
>
>> No worries Petr. All a part of the review process.
>>
>> I have attached an updated patch that prints only a warning message.
>>
>> thanks,
>>
>> Gabe
>>
>> On Tue, Oct 13, 2015 at 12:39 AM, Petr Spacek < 
>> pspa...@redhat.com> wrote:
>>
>>> Hello Gabe,
>>>
>>> I would like to apologize for the confusion regarding this patch and the
>>> repeated reworking.
>>>
>>> Unfortunately Honza's position is not mentioned in the ticket so you
>>> could not
>>> know what to do, but Honza is our "installer architect" so he has final
>>> say.
>>>
>>> Petr^2 Spacek
>>>
>>> On 13.10.2015 08:31, Jan Cholasta wrote:
>>> > Hi,
>>> >
>>> > I don't think this is the correct approach. We are aiming to have
>>> idempotent
>>> > installers, which means that running uninstall on a system without IPA
>>> > installed should be a no-op. This is the current behavior, so your
>>> patch is
>>> > actually moving us back.
>>> >
>>> > The proper fix would be to *remove* the check from install (as opposed
>>> to
>>> > adding it to uninstall), but this requires the install code to be
>>> idempotent,
>>> > and we're not there yet.
>>> >
>>> > I'm OK with making this a warning, but don't make it a fatal error
>>> and/or
>>> > require --force.
>>> >
>>> > Honza
>>> >
>>> > On 12.10.2015 17:12, Gabe Alford wrote:
>>> >> Thanks, Petr. Updated patch attached.
>>> >>
>>> >> Gabe
>>> >>
>>> >> On Mon, Oct 12, 2015 at 12:47 AM, Petr Spacek >> >> pspa...@redhat.com>> wrote:
>>> >>
>>> >> Hello Gabe,
>>> >>
>>> >> thank you for your patch!
>>> >>
>>> >> Please note that there might be a case where detection
>>> >> is_ipa_configured() is
>>> >> broken but the user still needs to run the uninstall process to
>>> >> clean it up.
>>> >>
>>> >> Could you amend the patch to respect --force option? In that case
>>> the
>>> >> detection should be skipped.
>>> >>
>>> >> Thank you for your time!
>>> >>
>>> >> Petr^2 Spacek
>>> >>
>>> >> On 9.10.2015 19:17, Gabe Alford wrote:
>>> >>  > diff --git a/ipaserver/install/server/install.py
>>> >> b/ipaserver/install/server/install.py
>>> >>  > index
>>> >>
>>> >>
>>> 13a59a0e6149dc22ded4a895db02516e9360e02b..ca93e7a6fd7276d9c0d82eb6f94575730759d858
>>> >>
>>> >> 100644
>>> >>  > --- a/ipaserver/install/server/install.py
>>> >>  > +++ b/ipaserver/install/server/install.py
>>> >>  > @@ -954,6 +954,12 @@ def uninstall_check(installer):
>>> >>  >
>>> >>  >  installer._installation_cleanup = False
>>> >>  >
>>> >>  > +if not is_ipa_configured():
>>> >>  > +print("IPA server is not configured on this
>>> system.\n" +
>>> >>  > +  "If you want to install the IPA server, please
>>> >> install " +
>>> >>  > +  "it using 'ipa-server-install'.")
>>> >>  > +sys.exit(1)
>>> >>  > +
>>> >>  >  fstore = sysrestore.FileStore(SYSRESTORE_DIR_PATH)
>>> >>  >  sstore = sysrestore.StateFile(SYSRESTORE_DIR_PATH)
>>>
>>
>>
>
>
>
>
From 47f82aa203e8302117d0c4c2b1bdcbf50153c021 Mon Sep 17 00:00:00 2001
From: Gabe 
Date: Wed, 21 Oct 2015 17:24:25 -0600
Subject: [PATCH] Warn if no installation found when running ipa-server-install
 --uninstall

https://fedorahosted.org/freeipa/ticket/5341
---
 ipaserver/install/server/install.py | 5 +
 1 file changed, 5 insertions(+)

diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py
index 3f8ba2027ac210cc5cc9cc706c5d39e01e6de7e4..16539892dcffb3ad0e95aab0c5a3d85f3bb44c48 100644
--- a/ipaserver/install/server/install.py
+++ b/ipaserver/install/server/install.py
@@ -968,6 +968,11 @@ def uninstall_check(installer):
 
 installer._installation_cleanup = False
 
+if not is_ipa_configured():
+print("WARNING:\nIPA server is not configured on this system. "
+  "If you want to install the\nIPA server, please install "
+  "it using 'ipa-server-install'.")
+
 fstore = sysrestore.FileStore(SYSRESTORE_DIR_PATH)
 sstore = sysrestore.StateFile(SYSRESTORE_DIR_PATH)
 
-- 
2.4.3

-- 
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

Re: [Freeipa-devel] [PATCH 0057] Warn in no installation found when running ipa-server-install --uninstall

2015-10-21 Thread Martin Basti



On 20.10.2015 05:17, Gabe Alford wrote:

Bump for re-review.


Hello,

thank your for your patch, the patch LGTM, but please use print() as 
function to be python2/3 compatible


Martin^2


On Tue, Oct 13, 2015 at 7:15 AM, Gabe Alford > wrote:


No worries Petr. All a part of the review process.

I have attached an updated patch that prints only a warning message.

thanks,

Gabe

On Tue, Oct 13, 2015 at 12:39 AM, Petr Spacek > wrote:

Hello Gabe,

I would like to apologize for the confusion regarding this
patch and the
repeated reworking.

Unfortunately Honza's position is not mentioned in the ticket
so you could not
know what to do, but Honza is our "installer architect" so he
has final say.

Petr^2 Spacek

On 13.10.2015  08:31, Jan Cholasta wrote:
> Hi,
>
> I don't think this is the correct approach. We are aiming to
have idempotent
> installers, which means that running uninstall on a system
without IPA
> installed should be a no-op. This is the current behavior,
so your patch is
> actually moving us back.
>
> The proper fix would be to *remove* the check from install
(as opposed to
> adding it to uninstall), but this requires the install code
to be idempotent,
> and we're not there yet.
>
> I'm OK with making this a warning, but don't make it a fatal
error and/or
> require --force.
>
> Honza
>
> On 12.10.2015 17:12, Gabe Alford wrote:
>> Thanks, Petr. Updated patch attached.
>>
>> Gabe
>>
>> On Mon, Oct 12, 2015 at 12:47 AM, Petr Spacek

>> >> wrote:
>>
>> Hello Gabe,
>>
>> thank you for your patch!
>>
>> Please note that there might be a case where detection
>> is_ipa_configured() is
>> broken but the user still needs to run the uninstall
process to
>> clean it up.
>>
>> Could you amend the patch to respect --force option? In
that case the
>> detection should be skipped.
>>
>> Thank you for your time!
>>
>> Petr^2 Spacek
>>
>> On 9.10.2015 19:17, Gabe Alford wrote:
>>  > diff --git a/ipaserver/install/server/install.py
>>  b/ipaserver/install/server/install.py
>>  > index
>>
>>

13a59a0e6149dc22ded4a895db02516e9360e02b..ca93e7a6fd7276d9c0d82eb6f94575730759d858
>>
>> 100644
>>  > --- a/ipaserver/install/server/install.py
>>  > +++ b/ipaserver/install/server/install.py
>>  > @@ -954,6 +954,12 @@ def uninstall_check(installer):
>>  >
>>  > installer._installation_cleanup = False
>>  >
>>  > +if not is_ipa_configured():
>>  > +print("IPA server is not configured on this
system.\n" +
>>  > +  "If you want to install the IPA
server, please
>> install " +
>>  > +  "it using 'ipa-server-install'.")
>>  > +sys.exit(1)
>>  > +
>>  >  fstore = sysrestore.FileStore(SYSRESTORE_DIR_PATH)
>>  >  sstore = sysrestore.StateFile(SYSRESTORE_DIR_PATH)







-- 
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

Re: [Freeipa-devel] [PATCH 0057] Warn in no installation found when running ipa-server-install --uninstall

2015-10-19 Thread Gabe Alford
Bump for re-review.

On Tue, Oct 13, 2015 at 7:15 AM, Gabe Alford  wrote:

> No worries Petr. All a part of the review process.
>
> I have attached an updated patch that prints only a warning message.
>
> thanks,
>
> Gabe
>
> On Tue, Oct 13, 2015 at 12:39 AM, Petr Spacek  wrote:
>
>> Hello Gabe,
>>
>> I would like to apologize for the confusion regarding this patch and the
>> repeated reworking.
>>
>> Unfortunately Honza's position is not mentioned in the ticket so you
>> could not
>> know what to do, but Honza is our "installer architect" so he has final
>> say.
>>
>> Petr^2 Spacek
>>
>> On 13.10.2015 08:31, Jan Cholasta wrote:
>> > Hi,
>> >
>> > I don't think this is the correct approach. We are aiming to have
>> idempotent
>> > installers, which means that running uninstall on a system without IPA
>> > installed should be a no-op. This is the current behavior, so your
>> patch is
>> > actually moving us back.
>> >
>> > The proper fix would be to *remove* the check from install (as opposed
>> to
>> > adding it to uninstall), but this requires the install code to be
>> idempotent,
>> > and we're not there yet.
>> >
>> > I'm OK with making this a warning, but don't make it a fatal error
>> and/or
>> > require --force.
>> >
>> > Honza
>> >
>> > On 12.10.2015 17:12, Gabe Alford wrote:
>> >> Thanks, Petr. Updated patch attached.
>> >>
>> >> Gabe
>> >>
>> >> On Mon, Oct 12, 2015 at 12:47 AM, Petr Spacek > >> > wrote:
>> >>
>> >> Hello Gabe,
>> >>
>> >> thank you for your patch!
>> >>
>> >> Please note that there might be a case where detection
>> >> is_ipa_configured() is
>> >> broken but the user still needs to run the uninstall process to
>> >> clean it up.
>> >>
>> >> Could you amend the patch to respect --force option? In that case
>> the
>> >> detection should be skipped.
>> >>
>> >> Thank you for your time!
>> >>
>> >> Petr^2 Spacek
>> >>
>> >> On 9.10.2015 19:17, Gabe Alford wrote:
>> >>  > diff --git a/ipaserver/install/server/install.py
>> >> b/ipaserver/install/server/install.py
>> >>  > index
>> >>
>> >>
>> 13a59a0e6149dc22ded4a895db02516e9360e02b..ca93e7a6fd7276d9c0d82eb6f94575730759d858
>> >>
>> >> 100644
>> >>  > --- a/ipaserver/install/server/install.py
>> >>  > +++ b/ipaserver/install/server/install.py
>> >>  > @@ -954,6 +954,12 @@ def uninstall_check(installer):
>> >>  >
>> >>  >  installer._installation_cleanup = False
>> >>  >
>> >>  > +if not is_ipa_configured():
>> >>  > +print("IPA server is not configured on this system.\n"
>> +
>> >>  > +  "If you want to install the IPA server, please
>> >> install " +
>> >>  > +  "it using 'ipa-server-install'.")
>> >>  > +sys.exit(1)
>> >>  > +
>> >>  >  fstore = sysrestore.FileStore(SYSRESTORE_DIR_PATH)
>> >>  >  sstore = sysrestore.StateFile(SYSRESTORE_DIR_PATH)
>>
>
>
-- 
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

Re: [Freeipa-devel] [PATCH 0057] Warn in no installation found when running ipa-server-install --uninstall

2015-10-13 Thread Jan Cholasta

Hi,

I don't think this is the correct approach. We are aiming to have 
idempotent installers, which means that running uninstall on a system 
without IPA installed should be a no-op. This is the current behavior, 
so your patch is actually moving us back.


The proper fix would be to *remove* the check from install (as opposed 
to adding it to uninstall), but this requires the install code to be 
idempotent, and we're not there yet.


I'm OK with making this a warning, but don't make it a fatal error 
and/or require --force.


Honza

On 12.10.2015 17:12, Gabe Alford wrote:

Thanks, Petr. Updated patch attached.

Gabe

On Mon, Oct 12, 2015 at 12:47 AM, Petr Spacek > wrote:

Hello Gabe,

thank you for your patch!

Please note that there might be a case where detection
is_ipa_configured() is
broken but the user still needs to run the uninstall process to
clean it up.

Could you amend the patch to respect --force option? In that case the
detection should be skipped.

Thank you for your time!

Petr^2 Spacek

On 9.10.2015 19:17, Gabe Alford wrote:
 > diff --git a/ipaserver/install/server/install.py
b/ipaserver/install/server/install.py
 > index

13a59a0e6149dc22ded4a895db02516e9360e02b..ca93e7a6fd7276d9c0d82eb6f94575730759d858
100644
 > --- a/ipaserver/install/server/install.py
 > +++ b/ipaserver/install/server/install.py
 > @@ -954,6 +954,12 @@ def uninstall_check(installer):
 >
 >  installer._installation_cleanup = False
 >
 > +if not is_ipa_configured():
 > +print("IPA server is not configured on this system.\n" +
 > +  "If you want to install the IPA server, please
install " +
 > +  "it using 'ipa-server-install'.")
 > +sys.exit(1)
 > +
 >  fstore = sysrestore.FileStore(SYSRESTORE_DIR_PATH)
 >  sstore = sysrestore.StateFile(SYSRESTORE_DIR_PATH)

--
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







--
Jan Cholasta

--
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


Re: [Freeipa-devel] [PATCH 0057] Warn in no installation found when running ipa-server-install --uninstall

2015-10-13 Thread Petr Spacek
Hello Gabe,

I would like to apologize for the confusion regarding this patch and the
repeated reworking.

Unfortunately Honza's position is not mentioned in the ticket so you could not
know what to do, but Honza is our "installer architect" so he has final say.

Petr^2 Spacek

On 13.10.2015 08:31, Jan Cholasta wrote:
> Hi,
> 
> I don't think this is the correct approach. We are aiming to have idempotent
> installers, which means that running uninstall on a system without IPA
> installed should be a no-op. This is the current behavior, so your patch is
> actually moving us back.
> 
> The proper fix would be to *remove* the check from install (as opposed to
> adding it to uninstall), but this requires the install code to be idempotent,
> and we're not there yet.
> 
> I'm OK with making this a warning, but don't make it a fatal error and/or
> require --force.
> 
> Honza
> 
> On 12.10.2015 17:12, Gabe Alford wrote:
>> Thanks, Petr. Updated patch attached.
>>
>> Gabe
>>
>> On Mon, Oct 12, 2015 at 12:47 AM, Petr Spacek > > wrote:
>>
>> Hello Gabe,
>>
>> thank you for your patch!
>>
>> Please note that there might be a case where detection
>> is_ipa_configured() is
>> broken but the user still needs to run the uninstall process to
>> clean it up.
>>
>> Could you amend the patch to respect --force option? In that case the
>> detection should be skipped.
>>
>> Thank you for your time!
>>
>> Petr^2 Spacek
>>
>> On 9.10.2015 19:17, Gabe Alford wrote:
>>  > diff --git a/ipaserver/install/server/install.py
>> b/ipaserver/install/server/install.py
>>  > index
>>
>> 13a59a0e6149dc22ded4a895db02516e9360e02b..ca93e7a6fd7276d9c0d82eb6f94575730759d858
>>
>> 100644
>>  > --- a/ipaserver/install/server/install.py
>>  > +++ b/ipaserver/install/server/install.py
>>  > @@ -954,6 +954,12 @@ def uninstall_check(installer):
>>  >
>>  >  installer._installation_cleanup = False
>>  >
>>  > +if not is_ipa_configured():
>>  > +print("IPA server is not configured on this system.\n" +
>>  > +  "If you want to install the IPA server, please
>> install " +
>>  > +  "it using 'ipa-server-install'.")
>>  > +sys.exit(1)
>>  > +
>>  >  fstore = sysrestore.FileStore(SYSRESTORE_DIR_PATH)
>>  >  sstore = sysrestore.StateFile(SYSRESTORE_DIR_PATH)

-- 
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


Re: [Freeipa-devel] [PATCH 0057] Warn in no installation found when running ipa-server-install --uninstall

2015-10-13 Thread Gabe Alford
No worries Petr. All a part of the review process.

I have attached an updated patch that prints only a warning message.

thanks,

Gabe

On Tue, Oct 13, 2015 at 12:39 AM, Petr Spacek  wrote:

> Hello Gabe,
>
> I would like to apologize for the confusion regarding this patch and the
> repeated reworking.
>
> Unfortunately Honza's position is not mentioned in the ticket so you could
> not
> know what to do, but Honza is our "installer architect" so he has final
> say.
>
> Petr^2 Spacek
>
> On 13.10.2015 08:31, Jan Cholasta wrote:
> > Hi,
> >
> > I don't think this is the correct approach. We are aiming to have
> idempotent
> > installers, which means that running uninstall on a system without IPA
> > installed should be a no-op. This is the current behavior, so your patch
> is
> > actually moving us back.
> >
> > The proper fix would be to *remove* the check from install (as opposed to
> > adding it to uninstall), but this requires the install code to be
> idempotent,
> > and we're not there yet.
> >
> > I'm OK with making this a warning, but don't make it a fatal error and/or
> > require --force.
> >
> > Honza
> >
> > On 12.10.2015 17:12, Gabe Alford wrote:
> >> Thanks, Petr. Updated patch attached.
> >>
> >> Gabe
> >>
> >> On Mon, Oct 12, 2015 at 12:47 AM, Petr Spacek  >> > wrote:
> >>
> >> Hello Gabe,
> >>
> >> thank you for your patch!
> >>
> >> Please note that there might be a case where detection
> >> is_ipa_configured() is
> >> broken but the user still needs to run the uninstall process to
> >> clean it up.
> >>
> >> Could you amend the patch to respect --force option? In that case
> the
> >> detection should be skipped.
> >>
> >> Thank you for your time!
> >>
> >> Petr^2 Spacek
> >>
> >> On 9.10.2015 19:17, Gabe Alford wrote:
> >>  > diff --git a/ipaserver/install/server/install.py
> >> b/ipaserver/install/server/install.py
> >>  > index
> >>
> >>
> 13a59a0e6149dc22ded4a895db02516e9360e02b..ca93e7a6fd7276d9c0d82eb6f94575730759d858
> >>
> >> 100644
> >>  > --- a/ipaserver/install/server/install.py
> >>  > +++ b/ipaserver/install/server/install.py
> >>  > @@ -954,6 +954,12 @@ def uninstall_check(installer):
> >>  >
> >>  >  installer._installation_cleanup = False
> >>  >
> >>  > +if not is_ipa_configured():
> >>  > +print("IPA server is not configured on this system.\n" +
> >>  > +  "If you want to install the IPA server, please
> >> install " +
> >>  > +  "it using 'ipa-server-install'.")
> >>  > +sys.exit(1)
> >>  > +
> >>  >  fstore = sysrestore.FileStore(SYSRESTORE_DIR_PATH)
> >>  >  sstore = sysrestore.StateFile(SYSRESTORE_DIR_PATH)
>
From 4d8b4b8c09c018f4a870b9f8d89d4e293e81b2cb Mon Sep 17 00:00:00 2001
From: Gabe 
Date: Tue, 13 Oct 2015 06:59:01 -0600
Subject: [PATCH] Warn if no installation found when running ipa-server-install
 --uninstall

https://fedorahosted.org/freeipa/ticket/5341
---
 ipaserver/install/server/install.py | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py
index 13a59a0e6149dc22ded4a895db02516e9360e02b..7186e82e70f86bf3f3be6e0f841daa6bcc8bf386 100644
--- a/ipaserver/install/server/install.py
+++ b/ipaserver/install/server/install.py
@@ -954,6 +954,12 @@ def uninstall_check(installer):
 
 installer._installation_cleanup = False
 
+if not is_ipa_configured():
+msg = ("WARNING:\nIPA server is not configured on this system."
+   "If you want to install the IPA server, please install "
+   "it using 'ipa-server-install'.")
+print textwrap.fill(msg, width=79, replace_whitespace=False)
+
 fstore = sysrestore.FileStore(SYSRESTORE_DIR_PATH)
 sstore = sysrestore.StateFile(SYSRESTORE_DIR_PATH)
 
-- 
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

Re: [Freeipa-devel] [PATCH 0057] Warn in no installation found when running ipa-server-install --uninstall

2015-10-12 Thread Petr Spacek
Hello Gabe,

thank you for your patch!

Please note that there might be a case where detection is_ipa_configured() is
broken but the user still needs to run the uninstall process to clean it up.

Could you amend the patch to respect --force option? In that case the
detection should be skipped.

Thank you for your time!

Petr^2 Spacek

On 9.10.2015 19:17, Gabe Alford wrote:
> diff --git a/ipaserver/install/server/install.py 
> b/ipaserver/install/server/install.py
> index 
> 13a59a0e6149dc22ded4a895db02516e9360e02b..ca93e7a6fd7276d9c0d82eb6f94575730759d858
>  100644
> --- a/ipaserver/install/server/install.py
> +++ b/ipaserver/install/server/install.py
> @@ -954,6 +954,12 @@ def uninstall_check(installer):
>  
>  installer._installation_cleanup = False
>  
> +if not is_ipa_configured():
> +print("IPA server is not configured on this system.\n" +
> +  "If you want to install the IPA server, please install " +
> +  "it using 'ipa-server-install'.")
> +sys.exit(1)
> +
>  fstore = sysrestore.FileStore(SYSRESTORE_DIR_PATH)
>  sstore = sysrestore.StateFile(SYSRESTORE_DIR_PATH)

-- 
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