Hello,

Attached patches fix the following tickets related to IPA log files:

https://fedorahosted.org/freeipa/ticket/5724
https://fedorahosted.org/freeipa/ticket/5726
https://fedorahosted.org/freeipa/ticket/5727

Patch 0067 should be applied first, and patch 0069 applied last.

Thanks,

Gabe
From 5646ee0311e5d9195d5510eb5c20fc9dfa1cb1d7 Mon Sep 17 00:00:00 2001
From: Gabe <redhatri...@gmail.com>
Date: Thu, 10 Mar 2016 07:08:55 -0700
Subject: [PATCH 1/3] Store IPA logs in one directory - /var/log/ipa

https://fedorahosted.org/freeipa/ticket/5724
---
 freeipa.spec.in           |  2 ++
 ipaplatform/base/paths.py | 26 +++++++++++++-------------
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 9e277020d70215e052ab6c905b1c6a29ae6cdd4d..a3499ea4947c6c89d3ac232ed22fb0eb7ee6bb4d 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -828,6 +828,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/ipa/
 /bin/touch %{buildroot}%{_sysconfdir}/ipa/default.conf
 /bin/touch %{buildroot}%{_sysconfdir}/ipa/ca.crt
 mkdir -p %{buildroot}%{_sysconfdir}/ipa/nssdb
+mkdir -p %{buildroot}/%{_localstatedir}/log/ipa
 mkdir -p %{buildroot}/%{_localstatedir}/lib/ipa-client/sysrestore
 mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
 install -pm 644 contrib/completion/ipa.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/ipa
@@ -1298,6 +1299,7 @@ fi
 %ghost %config(noreplace) %{_sysconfdir}/ipa/nssdb/pwdfile.txt
 %ghost %config(noreplace) %{_sysconfdir}/pki/ca-trust/source/ipa.p11-kit
 %dir %{_usr}/share/ipa
+%dir %{_localstatedir}/log/ipa
 %dir %{_localstatedir}/lib/ipa-client
 %dir %{_localstatedir}/lib/ipa-client/sysrestore
 %{_mandir}/man5/default.conf.5.gz
diff --git a/ipaplatform/base/paths.py b/ipaplatform/base/paths.py
index bdff4f3934f3250bdfef3f913631b98d55d759b6..76a362b1945e6c1fa6554c9859605012b89d0e88 100644
--- a/ipaplatform/base/paths.py
+++ b/ipaplatform/base/paths.py
@@ -294,19 +294,19 @@ class BasePathNamespace(object):
     SLAPD_INSTANCE_ACCESS_LOG_TEMPLATE = "/var/log/dirsrv/slapd-%s/access"
     SLAPD_INSTANCE_ERROR_LOG_TEMPLATE = "/var/log/dirsrv/slapd-%s/errors"
     VAR_LOG_HTTPD_DIR = "/var/log/httpd"
-    IPABACKUP_LOG = "/var/log/ipabackup.log"
-    IPACLIENT_INSTALL_LOG = "/var/log/ipaclient-install.log"
-    IPACLIENT_UNINSTALL_LOG = "/var/log/ipaclient-uninstall.log"
-    IPAREPLICA_CA_INSTALL_LOG = "/var/log/ipareplica-ca-install.log"
-    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"
-    IPASERVER_UNINSTALL_LOG = "/var/log/ipaserver-uninstall.log"
-    IPAUPGRADE_LOG = "/var/log/ipaupgrade.log"
+    IPABACKUP_LOG = "/var/log/ipa/ipabackup.log"
+    IPACLIENT_INSTALL_LOG = "/var/log/ipa/ipaclient-install.log"
+    IPACLIENT_UNINSTALL_LOG = "/var/log/ipa/ipaclient-uninstall.log"
+    IPAREPLICA_CA_INSTALL_LOG = "/var/log/ipa/ipareplica-ca-install.log"
+    IPAREPLICA_CONNCHECK_LOG = "/var/log/ipa/ipareplica-conncheck.log"
+    IPAREPLICA_INSTALL_LOG = "/var/log/ipa/ipareplica-install.log"
+    IPARESTORE_LOG = "/var/log/ipa/iparestore.log"
+    IPASERVER_CA_INSTALL_LOG = "/var/log/ipa/ipaserver-ca-install.log"
+    IPASERVER_INSTALL_LOG = "/var/log/ipa/ipaserver-install.log"
+    IPASERVER_KRA_INSTALL_LOG = "/var/log/ipa/ipaserver-kra-install.log"
+    IPASERVER_KRA_UNINSTALL_LOG = "/var/log/ipa/ipaserver-kra-uninstall.log"
+    IPASERVER_UNINSTALL_LOG = "/var/log/ipa/ipaserver-uninstall.log"
+    IPAUPGRADE_LOG = "/var/log/ipa/ipaupgrade.log"
     KADMIND_LOG = "/var/log/kadmind.log"
     MESSAGES = "/var/log/messages"
     VAR_LOG_PKI_DIR = "/var/log/pki/"
-- 
1.8.3.1

From 6d87d26228424b3a4a25dafefdd60359b71043b2 Mon Sep 17 00:00:00 2001
From: Gabe <redhatri...@gmail.com>
Date: Thu, 10 Mar 2016 07:10:56 -0700
Subject: [PATCH 2/3] Remove unused ipareplica-ca-install.log

https://fedorahosted.org/freeipa/ticket/5727
---
 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 1bc5def03bf687a1e4f9fb38a54363b5429c8fc4..cea2f0ddf392f807bd08198c1b8aa3c3e4cca4bc 100755
--- a/install/tools/ipa-ca-install
+++ b/install/tools/ipa-ca-install
@@ -38,7 +38,7 @@ from ipapython.config import IPAOptionParser
 from ipapython.ipa_log_manager import root_logger, standard_logging_setup
 from ipaplatform.paths import paths
 
-log_file_name = paths.IPAREPLICA_CA_INSTALL_LOG
+log_file_name = paths.IPASERVER_CA_INSTALL_LOG
 REPLICA_INFO_TOP_DIR = None
 
 def parse_options():
diff --git a/ipaplatform/base/paths.py b/ipaplatform/base/paths.py
index 76a362b1945e6c1fa6554c9859605012b89d0e88..94684fa88466c20ffe92c938f515612f8f5cbf49 100644
--- a/ipaplatform/base/paths.py
+++ b/ipaplatform/base/paths.py
@@ -297,7 +297,6 @@ class BasePathNamespace(object):
     IPABACKUP_LOG = "/var/log/ipa/ipabackup.log"
     IPACLIENT_INSTALL_LOG = "/var/log/ipa/ipaclient-install.log"
     IPACLIENT_UNINSTALL_LOG = "/var/log/ipa/ipaclient-uninstall.log"
-    IPAREPLICA_CA_INSTALL_LOG = "/var/log/ipa/ipareplica-ca-install.log"
     IPAREPLICA_CONNCHECK_LOG = "/var/log/ipa/ipareplica-conncheck.log"
     IPAREPLICA_INSTALL_LOG = "/var/log/ipa/ipareplica-install.log"
     IPARESTORE_LOG = "/var/log/ipa/iparestore.log"
-- 
1.8.3.1

From a11ce33b2685fbea1d7259df7b8ff7e39f521143 Mon Sep 17 00:00:00 2001
From: Gabe <redhatri...@gmail.com>
Date: Thu, 10 Mar 2016 07:13:17 -0700
Subject: [PATCH 3/3] ipa-dns-install should log to its own logfile

https://fedorahosted.org/freeipa/ticket/5726
---
 install/tools/ipa-dns-install | 2 +-
 ipaplatform/base/paths.py     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install
index 2eb1d0258bd6e323f9659da84692facef85a788d..420f2d84c0f96fbd9cc502240c5d38b83ed8672f 100755
--- a/install/tools/ipa-dns-install
+++ b/install/tools/ipa-dns-install
@@ -39,7 +39,7 @@ from ipapython.ipa_log_manager import standard_logging_setup, root_logger
 
 from ipaserver.install import dns as dns_installer
 
-log_file_name = paths.IPASERVER_INSTALL_LOG
+log_file_name = paths.IPASERVER_DNS_INSTALL_LOG
 
 def parse_options():
     parser = IPAOptionParser(version=version.VERSION)
diff --git a/ipaplatform/base/paths.py b/ipaplatform/base/paths.py
index 94684fa88466c20ffe92c938f515612f8f5cbf49..3bc61dc3839e7402ffc349b40899613bb87ab4d5 100644
--- a/ipaplatform/base/paths.py
+++ b/ipaplatform/base/paths.py
@@ -301,6 +301,7 @@ class BasePathNamespace(object):
     IPAREPLICA_INSTALL_LOG = "/var/log/ipa/ipareplica-install.log"
     IPARESTORE_LOG = "/var/log/ipa/iparestore.log"
     IPASERVER_CA_INSTALL_LOG = "/var/log/ipa/ipaserver-ca-install.log"
+    IPASERVER_DNS_INSTALL_LOG = "/var/log/ipa/ipaserver-dns-install.log"
     IPASERVER_INSTALL_LOG = "/var/log/ipa/ipaserver-install.log"
     IPASERVER_KRA_INSTALL_LOG = "/var/log/ipa/ipaserver-kra-install.log"
     IPASERVER_KRA_UNINSTALL_LOG = "/var/log/ipa/ipaserver-kra-uninstall.log"
-- 
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