On 07/19/2016 09:27 AM, Petr Vobornik wrote:
> On 07/19/2016 08:01 AM, Jan Cholasta wrote:
>> Hi,
>>
>> On 18.7.2016 18:50, Florence Blanc-Renaud wrote:
>>> On 07/15/2016 04:29 PM, Petr Vobornik wrote:
>>>> ipa-ca-install said that it used
>>>>   /var/log/ipareplica-ca-install.log
>>>> but in fact it used
>>>>   /var/log/ipaserver-ca-install.log
>>>>
>>>> This patch unites it to ipaserver-ca-install.log
>>>>
>>>> It was chosen because ipa-ca-install can be also used on
>>>> master on CA-less -> CA conversion.
>>>>
>>>> Term "server" is valid for both master and replica.
>>>>
>>>> https://fedorahosted.org/freeipa/ticket/6088
>>>>
>>>>
>>>>
>>>
>>> Looks good to me.
>>> Ack
>>
>> Does not look so good to me, "ipareplica-ca-install.log" is in fact the
>> original file name used since ipa-ca-install was introduced (in commit
>> 8a32bb3746802a29b2655e4ad2cbbba8481e1eaf), so why the switch to
>> "ipaserver-ca-install.log"?
>>
>> Honza
>>
> 
> Ideally it would be ipa-ca-install.log but for backwards compatibility,
> let's stick with one which we have. AFAIK the framework(run_script
> methodĂș doesn't support switching the log name which is printed in error
> message depending on usage. Therefore the universal was chosen -
> ipaserver-ca-install.log. It was introduced by your commit
> d27e77adc56f5a04f3bdd1aaed5440a89ed3acad
> 
> And I see, that I used wrong ticket number in the commit. Correct is
> https://fedorahosted.org/freeipa/ticket/6086
> 
> Proper solution might be to rework main and __main__ function in
> ipa-ca-install but IMO we spent too much time on this already.
> 

Updated patch attach - it uses the other log.

-- 
Petr Vobornik
From 4a5904b726c11c7e3323de142e5d47a5b51cff88 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Fri, 15 Jul 2016 16:25:36 +0200
Subject: [PATCH] unite log file name of ipa-ca-install

ipa-ca-install said that it used
  /var/log/ipareplica-ca-install.log
but in fact it used
  /var/log/ipaserver-ca-install.log

This patch unites it to ipareplica-ca-install.log

It was chosen because of backwards compatibility - ipareplica-ca-install
was more commonly used. ipaserver-ca-install.log was used only in rare
CA less -> CA installation.

https://fedorahosted.org/freeipa/ticket/6088
---
 install/tools/ipa-ca-install | 2 +-
 ipaplatform/base/paths.py    | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/install/tools/ipa-ca-install b/install/tools/ipa-ca-install
index ed685920cbadb9cd3fc80865afb1610ca42f8b13..985e7413aa06900976934c329757ce45da5ff12d 100755
--- a/install/tools/ipa-ca-install
+++ b/install/tools/ipa-ca-install
@@ -285,7 +285,7 @@ def main():
             cainstance.is_ca_installed_locally()):
         sys.exit("CA is already installed on this host.")
 
-    standard_logging_setup(paths.IPASERVER_CA_INSTALL_LOG, debug=options.debug)
+    standard_logging_setup(log_file_name, debug=options.debug)
     root_logger.debug("%s was invoked with options: %s,%s",
                       sys.argv[0], safe_options, filename)
     root_logger.debug("IPA version %s", version.VENDOR_VERSION)
diff --git a/ipaplatform/base/paths.py b/ipaplatform/base/paths.py
index d6fbe32f6839a5db40148777132ba1454cbc3382..1507ac36da5b40447c951ee608053a09b2db2fc3 100644
--- a/ipaplatform/base/paths.py
+++ b/ipaplatform/base/paths.py
@@ -307,7 +307,6 @@ class BasePathNamespace(object):
     IPAREPLICA_CONNCHECK_LOG = "/var/log/ipareplica-conncheck.log"
     IPAREPLICA_INSTALL_LOG = "/var/log/ipareplica-install.log"
     IPARESTORE_LOG = "/var/log/iparestore.log"
-    IPASERVER_CA_INSTALL_LOG = "/var/log/ipaserver-ca-install.log"
     IPASERVER_INSTALL_LOG = "/var/log/ipaserver-install.log"
     IPASERVER_KRA_INSTALL_LOG = "/var/log/ipaserver-kra-install.log"
     IPASERVER_KRA_UNINSTALL_LOG = "/var/log/ipaserver-kra-uninstall.log"
-- 
2.5.5

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