Re: [Freeipa-devel] [PATCH] 323 Report ipa-upgradeconfig errors during RPM upgrade

2012-10-19 Thread Martin Kosek
On 10/18/2012 05:51 PM, Rob Crittenden wrote:
 Martin Kosek wrote:
 On 10/18/2012 05:22 PM, Rob Crittenden wrote:
 Martin Kosek wrote:
 Report errors just like with ipa-ldap-updater. These messages should warn
 user that some parts of the upgrades may have not been successful and
 he should follow up on them. Otherwise, user may not notice them at all.

 ipa-upgradeconfig logging has been made consistent with ipa-ldap-updater
 logging - only error level or higher severity log messages are printed
 to stderr, with the same console format. A new debug log that an upgrade
 script has started was added to make log investigation easier.

 https://fedorahosted.org/freeipa/ticket/3157

 ---

 Reproducer is in Bugzilla attached to the ticket. With this patch, RPM 
 update
 will report errors to user:

 # rpm -Uvh --force ~/freeipa-master/dist/rpms/freeipa-*
 Preparing...### 
 [100%]
  1:freeipa-python ### [
 14%]
  2:freeipa-client ### [
 29%]
  3:freeipa-admintools ### [
 43%]
  4:freeipa-server ### [
 57%]
 ERROR: Cannot update connections in /etc/named.conf: [Errno 13] Permission
 denied: '/etc/named.conf'
  5:freeipa-server-selinux ### [
 71%]
  6:freeipa-server-trust-ad### [
 86%]
  7:freeipa-debuginfo  ###
 [100%]

 Martin

 Can you add an option to run in info mode (the equivalent of verbose=True)?
 Otherwise running from the cli returns nothing unless there is an error, I 
 like
 some amount of output myself.

 rob


 ipa-upgradeconfig has a --debug option. I doubt that the output can be more
 verbose :-)

 Martin

 
 Yeah, but there is no middle ground. You either get everything or nothing.
 
 rob

Well, I can add it if you want it really hard. But from my perspective, having
both --debug and --verbose is strange and it will also make it inconsistent
with our other CLI tools where we have just --debug option (ipa-ldap-updater,
ipa-replica-prepare, ipa-*-install).

Martin

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 323 Report ipa-upgradeconfig errors during RPM upgrade

2012-10-19 Thread Petr Viktorin

On 10/19/2012 08:15 AM, Martin Kosek wrote:

On 10/18/2012 05:51 PM, Rob Crittenden wrote:

Martin Kosek wrote:

On 10/18/2012 05:22 PM, Rob Crittenden wrote:

Martin Kosek wrote:

Report errors just like with ipa-ldap-updater. These messages should warn
user that some parts of the upgrades may have not been successful and
he should follow up on them. Otherwise, user may not notice them at all.

ipa-upgradeconfig logging has been made consistent with ipa-ldap-updater
logging - only error level or higher severity log messages are printed
to stderr, with the same console format. A new debug log that an upgrade
script has started was added to make log investigation easier.

https://fedorahosted.org/freeipa/ticket/3157

---

Reproducer is in Bugzilla attached to the ticket. With this patch, RPM update
will report errors to user:

# rpm -Uvh --force ~/freeipa-master/dist/rpms/freeipa-*
Preparing...### [100%]
  1:freeipa-python ### [
14%]
  2:freeipa-client ### [
29%]
  3:freeipa-admintools ### [
43%]
  4:freeipa-server ### [
57%]
ERROR: Cannot update connections in /etc/named.conf: [Errno 13] Permission
denied: '/etc/named.conf'
  5:freeipa-server-selinux ### [
71%]
  6:freeipa-server-trust-ad### [
86%]
  7:freeipa-debuginfo  ###
[100%]

Martin


Can you add an option to run in info mode (the equivalent of verbose=True)?
Otherwise running from the cli returns nothing unless there is an error, I like
some amount of output myself.

rob



ipa-upgradeconfig has a --debug option. I doubt that the output can be more
verbose :-)

Martin



Yeah, but there is no middle ground. You either get everything or nothing.

rob


Well, I can add it if you want it really hard. But from my perspective, having
both --debug and --verbose is strange and it will also make it inconsistent
with our other CLI tools where we have just --debug option (ipa-ldap-updater,
ipa-replica-prepare, ipa-*-install).



I like ipa-replica-conncheck's approach: --debug (output everything) and 
--quiet (only output errors).


--
PetrĀ³

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 323 Report ipa-upgradeconfig errors during RPM upgrade

2012-10-19 Thread Rob Crittenden

Petr Viktorin wrote:

On 10/19/2012 08:15 AM, Martin Kosek wrote:

On 10/18/2012 05:51 PM, Rob Crittenden wrote:

Martin Kosek wrote:

On 10/18/2012 05:22 PM, Rob Crittenden wrote:

Martin Kosek wrote:

Report errors just like with ipa-ldap-updater. These messages
should warn
user that some parts of the upgrades may have not been successful and
he should follow up on them. Otherwise, user may not notice them
at all.

ipa-upgradeconfig logging has been made consistent with
ipa-ldap-updater
logging - only error level or higher severity log messages are
printed
to stderr, with the same console format. A new debug log that an
upgrade
script has started was added to make log investigation easier.

https://fedorahosted.org/freeipa/ticket/3157

---

Reproducer is in Bugzilla attached to the ticket. With this patch,
RPM update
will report errors to user:

# rpm -Uvh --force ~/freeipa-master/dist/rpms/freeipa-*
Preparing...
### [100%]
  1:freeipa-python
### [
14%]
  2:freeipa-client
### [
29%]
  3:freeipa-admintools
### [
43%]
  4:freeipa-server
### [
57%]
ERROR: Cannot update connections in /etc/named.conf: [Errno 13]
Permission
denied: '/etc/named.conf'
  5:freeipa-server-selinux
### [
71%]

6:freeipa-server-trust-ad###
[
86%]
  7:freeipa-debuginfo
###
[100%]

Martin


Can you add an option to run in info mode (the equivalent of
verbose=True)?
Otherwise running from the cli returns nothing unless there is an
error, I like
some amount of output myself.

rob



ipa-upgradeconfig has a --debug option. I doubt that the output can
be more
verbose :-)

Martin



Yeah, but there is no middle ground. You either get everything or
nothing.

rob


Well, I can add it if you want it really hard. But from my
perspective, having
both --debug and --verbose is strange and it will also make it
inconsistent
with our other CLI tools where we have just --debug option
(ipa-ldap-updater,
ipa-replica-prepare, ipa-*-install).



I like ipa-replica-conncheck's approach: --debug (output everything) and
--quiet (only output errors).



I guess I'm sad because we spent a fair bit of time adding pretty output 
to the script in non-debug mode which we are not suppressing.


ACK on quiet mode.

rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 323 Report ipa-upgradeconfig errors during RPM upgrade

2012-10-19 Thread Martin Kosek
On 10/19/2012 03:23 PM, Rob Crittenden wrote:
 Petr Viktorin wrote:
 On 10/19/2012 08:15 AM, Martin Kosek wrote:
 On 10/18/2012 05:51 PM, Rob Crittenden wrote:
 Martin Kosek wrote:
 On 10/18/2012 05:22 PM, Rob Crittenden wrote:
 Martin Kosek wrote:
 Report errors just like with ipa-ldap-updater. These messages
 should warn
 user that some parts of the upgrades may have not been successful and
 he should follow up on them. Otherwise, user may not notice them
 at all.

 ipa-upgradeconfig logging has been made consistent with
 ipa-ldap-updater
 logging - only error level or higher severity log messages are
 printed
 to stderr, with the same console format. A new debug log that an
 upgrade
 script has started was added to make log investigation easier.

 https://fedorahosted.org/freeipa/ticket/3157

 ---

 Reproducer is in Bugzilla attached to the ticket. With this patch,
 RPM update
 will report errors to user:

 # rpm -Uvh --force ~/freeipa-master/dist/rpms/freeipa-*
 Preparing...
 ### [100%]
   1:freeipa-python
 ### [
 14%]
   2:freeipa-client
 ### [
 29%]
   3:freeipa-admintools
 ### [
 43%]
   4:freeipa-server
 ### [
 57%]
 ERROR: Cannot update connections in /etc/named.conf: [Errno 13]
 Permission
 denied: '/etc/named.conf'
   5:freeipa-server-selinux
 ### [
 71%]

 6:freeipa-server-trust-ad###
 [
 86%]
   7:freeipa-debuginfo
 ###
 [100%]

 Martin

 Can you add an option to run in info mode (the equivalent of
 verbose=True)?
 Otherwise running from the cli returns nothing unless there is an
 error, I like
 some amount of output myself.

 rob


 ipa-upgradeconfig has a --debug option. I doubt that the output can
 be more
 verbose :-)

 Martin


 Yeah, but there is no middle ground. You either get everything or
 nothing.

 rob

 Well, I can add it if you want it really hard. But from my
 perspective, having
 both --debug and --verbose is strange and it will also make it
 inconsistent
 with our other CLI tools where we have just --debug option
 (ipa-ldap-updater,
 ipa-replica-prepare, ipa-*-install).


 I like ipa-replica-conncheck's approach: --debug (output everything) and
 --quiet (only output errors).

 
 I guess I'm sad because we spent a fair bit of time adding pretty output to 
 the
 script in non-debug mode which we are not suppressing.
 
 ACK on quiet mode.
 
 rob

Ok, you won, this actually makes sense - added a --quiet mode. I also played a
bit with console level formatting and print the level only in --debug mode.

Martin
From 95366eb5f5685415be348c64f15308ed19ee7c71 Mon Sep 17 00:00:00 2001
From: Martin Kosek mko...@redhat.com
Date: Wed, 17 Oct 2012 13:05:24 +0200
Subject: [PATCH] Report ipa-upgradeconfig errors during RPM upgrade

Report errors just like with ipa-ldap-updater. These messages should warn
user that some parts of the upgrades may have not been successful and
he should follow up on them. Otherwise, user may not notice them at all.

ipa-upgradeconfig now has a new --quiet option to make it output only error
level log messages or higher. ipa-upgradeconfig run without options still
pring INFO log messages as it can provide a clean overview about its
actions (unlike ipa-ldap-updater).

https://fedorahosted.org/freeipa/ticket/3157
---
 freeipa.spec.in   |  5 -
 install/tools/ipa-upgradeconfig   | 15 ---
 install/tools/man/ipa-upgradeconfig.8 |  4 
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 060f09b12e6891defc8cb00d4f52a0d019198a70..916630029f6dfac8ef32dabb00f338052cbbf08e 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -493,7 +493,7 @@ if [ $1 = 1 ]; then
 fi
 %endif
 if [ $1 -gt 1 ] ; then
-/usr/sbin/ipa-upgradeconfig /dev/null 21 || :
+/usr/sbin/ipa-upgradeconfig --quiet /dev/null || :
 fi
 
 %posttrans server
@@ -815,6 +815,9 @@ fi
 %ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt
 
 %changelog
+* Wed Oct 17 2012 Martin Kosek mko...@redhat.com - 2.99.0-51
+- Print ipa-upgradeconfig errors during RPM update
+
 * Wed Oct 10 2012 Alexander Bokovoy aboko...@redhat.com - 2.99.0-50
 - Make sure server-trust-ad subpackage alternates winbind_krb5_locator.so
   plugin to /dev/null since they cannot be used when trusts are configured
diff --git a/install/tools/ipa-upgradeconfig b/install/tools/ipa-upgradeconfig
index 38426149864017789614095445f947a997d63b3c..14d4e0829162ab78665f794c582e704b5901ea41 100644
--- a/install/tools/ipa-upgradeconfig
+++ b/install/tools/ipa-upgradeconfig
@@ -61,6 +61,9 @@ def parse_options():
 parser = IPAOptionParser(version=version.VERSION)
 parser.add_option(-d, --debug, 

Re: [Freeipa-devel] [PATCH] 323 Report ipa-upgradeconfig errors during RPM upgrade

2012-10-19 Thread Petr Viktorin

On 10/19/2012 04:06 PM, Martin Kosek wrote:

On 10/19/2012 03:23 PM, Rob Crittenden wrote:

Petr Viktorin wrote:

On 10/19/2012 08:15 AM, Martin Kosek wrote:

On 10/18/2012 05:51 PM, Rob Crittenden wrote:

Martin Kosek wrote:

On 10/18/2012 05:22 PM, Rob Crittenden wrote:

Martin Kosek wrote:

Report errors just like with ipa-ldap-updater. These messages
should warn
user that some parts of the upgrades may have not been successful and
he should follow up on them. Otherwise, user may not notice them
at all.

ipa-upgradeconfig logging has been made consistent with
ipa-ldap-updater
logging - only error level or higher severity log messages are
printed
to stderr, with the same console format. A new debug log that an
upgrade
script has started was added to make log investigation easier.

https://fedorahosted.org/freeipa/ticket/3157

---

Reproducer is in Bugzilla attached to the ticket. With this patch,
RPM update
will report errors to user:

# rpm -Uvh --force ~/freeipa-master/dist/rpms/freeipa-*
Preparing...
### [100%]
   1:freeipa-python
### [
14%]
   2:freeipa-client
### [
29%]
   3:freeipa-admintools
### [
43%]
   4:freeipa-server
### [
57%]
ERROR: Cannot update connections in /etc/named.conf: [Errno 13]
Permission
denied: '/etc/named.conf'
   5:freeipa-server-selinux
### [
71%]

6:freeipa-server-trust-ad###
[
86%]
   7:freeipa-debuginfo
###
[100%]

Martin


Can you add an option to run in info mode (the equivalent of
verbose=True)?
Otherwise running from the cli returns nothing unless there is an
error, I like
some amount of output myself.

rob



ipa-upgradeconfig has a --debug option. I doubt that the output can
be more
verbose :-)

Martin



Yeah, but there is no middle ground. You either get everything or
nothing.

rob


Well, I can add it if you want it really hard. But from my
perspective, having
both --debug and --verbose is strange and it will also make it
inconsistent
with our other CLI tools where we have just --debug option
(ipa-ldap-updater,
ipa-replica-prepare, ipa-*-install).



I like ipa-replica-conncheck's approach: --debug (output everything) and
--quiet (only output errors).



I guess I'm sad because we spent a fair bit of time adding pretty output to the
script in non-debug mode which we are not suppressing.

ACK on quiet mode.

rob


Ok, you won, this actually makes sense - added a --quiet mode. I also played a
bit with console level formatting and print the level only in --debug mode.



Nice idea. I think it would be useful if standard_logging_setup did this 
by default (though this patch is probably not the place for 
standard_logging_setup changes).


--
PetrĀ³

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 323 Report ipa-upgradeconfig errors during RPM upgrade

2012-10-19 Thread Rob Crittenden

Martin Kosek wrote:

On 10/19/2012 03:23 PM, Rob Crittenden wrote:

Petr Viktorin wrote:

On 10/19/2012 08:15 AM, Martin Kosek wrote:

On 10/18/2012 05:51 PM, Rob Crittenden wrote:

Martin Kosek wrote:

On 10/18/2012 05:22 PM, Rob Crittenden wrote:

Martin Kosek wrote:

Report errors just like with ipa-ldap-updater. These messages
should warn
user that some parts of the upgrades may have not been successful and
he should follow up on them. Otherwise, user may not notice them
at all.

ipa-upgradeconfig logging has been made consistent with
ipa-ldap-updater
logging - only error level or higher severity log messages are
printed
to stderr, with the same console format. A new debug log that an
upgrade
script has started was added to make log investigation easier.

https://fedorahosted.org/freeipa/ticket/3157

---

Reproducer is in Bugzilla attached to the ticket. With this patch,
RPM update
will report errors to user:

# rpm -Uvh --force ~/freeipa-master/dist/rpms/freeipa-*
Preparing...
### [100%]
   1:freeipa-python
### [
14%]
   2:freeipa-client
### [
29%]
   3:freeipa-admintools
### [
43%]
   4:freeipa-server
### [
57%]
ERROR: Cannot update connections in /etc/named.conf: [Errno 13]
Permission
denied: '/etc/named.conf'
   5:freeipa-server-selinux
### [
71%]

6:freeipa-server-trust-ad###
[
86%]
   7:freeipa-debuginfo
###
[100%]

Martin


Can you add an option to run in info mode (the equivalent of
verbose=True)?
Otherwise running from the cli returns nothing unless there is an
error, I like
some amount of output myself.

rob



ipa-upgradeconfig has a --debug option. I doubt that the output can
be more
verbose :-)

Martin



Yeah, but there is no middle ground. You either get everything or
nothing.

rob


Well, I can add it if you want it really hard. But from my
perspective, having
both --debug and --verbose is strange and it will also make it
inconsistent
with our other CLI tools where we have just --debug option
(ipa-ldap-updater,
ipa-replica-prepare, ipa-*-install).



I like ipa-replica-conncheck's approach: --debug (output everything) and
--quiet (only output errors).



I guess I'm sad because we spent a fair bit of time adding pretty output to the
script in non-debug mode which we are not suppressing.

ACK on quiet mode.

rob


Ok, you won, this actually makes sense - added a --quiet mode. I also played a
bit with console level formatting and print the level only in --debug mode.

Martin



ACK, pushed to master and ipa-3-0

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 323 Report ipa-upgradeconfig errors during RPM upgrade

2012-10-18 Thread Rob Crittenden

Martin Kosek wrote:

Report errors just like with ipa-ldap-updater. These messages should warn
user that some parts of the upgrades may have not been successful and
he should follow up on them. Otherwise, user may not notice them at all.

ipa-upgradeconfig logging has been made consistent with ipa-ldap-updater
logging - only error level or higher severity log messages are printed
to stderr, with the same console format. A new debug log that an upgrade
script has started was added to make log investigation easier.

https://fedorahosted.org/freeipa/ticket/3157

---

Reproducer is in Bugzilla attached to the ticket. With this patch, RPM update
will report errors to user:

# rpm -Uvh --force ~/freeipa-master/dist/rpms/freeipa-*
Preparing...### [100%]
1:freeipa-python ### [ 14%]
2:freeipa-client ### [ 29%]
3:freeipa-admintools ### [ 43%]
4:freeipa-server ### [ 57%]
ERROR: Cannot update connections in /etc/named.conf: [Errno 13] Permission
denied: '/etc/named.conf'
5:freeipa-server-selinux ### [ 71%]
6:freeipa-server-trust-ad### [ 86%]
7:freeipa-debuginfo  ### [100%]

Martin


Can you add an option to run in info mode (the equivalent of 
verbose=True)? Otherwise running from the cli returns nothing unless 
there is an error, I like some amount of output myself.


rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 323 Report ipa-upgradeconfig errors during RPM upgrade

2012-10-18 Thread Martin Kosek
On 10/18/2012 05:22 PM, Rob Crittenden wrote:
 Martin Kosek wrote:
 Report errors just like with ipa-ldap-updater. These messages should warn
 user that some parts of the upgrades may have not been successful and
 he should follow up on them. Otherwise, user may not notice them at all.

 ipa-upgradeconfig logging has been made consistent with ipa-ldap-updater
 logging - only error level or higher severity log messages are printed
 to stderr, with the same console format. A new debug log that an upgrade
 script has started was added to make log investigation easier.

 https://fedorahosted.org/freeipa/ticket/3157

 ---

 Reproducer is in Bugzilla attached to the ticket. With this patch, RPM update
 will report errors to user:

 # rpm -Uvh --force ~/freeipa-master/dist/rpms/freeipa-*
 Preparing...### 
 [100%]
 1:freeipa-python ### [ 
 14%]
 2:freeipa-client ### [ 
 29%]
 3:freeipa-admintools ### [ 
 43%]
 4:freeipa-server ### [ 
 57%]
 ERROR: Cannot update connections in /etc/named.conf: [Errno 13] Permission
 denied: '/etc/named.conf'
 5:freeipa-server-selinux ### [ 
 71%]
 6:freeipa-server-trust-ad### [ 
 86%]
 7:freeipa-debuginfo  ### 
 [100%]

 Martin
 
 Can you add an option to run in info mode (the equivalent of verbose=True)?
 Otherwise running from the cli returns nothing unless there is an error, I 
 like
 some amount of output myself.
 
 rob
 

ipa-upgradeconfig has a --debug option. I doubt that the output can be more
verbose :-)

Martin

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 323 Report ipa-upgradeconfig errors during RPM upgrade

2012-10-18 Thread Rob Crittenden

Martin Kosek wrote:

On 10/18/2012 05:22 PM, Rob Crittenden wrote:

Martin Kosek wrote:

Report errors just like with ipa-ldap-updater. These messages should warn
user that some parts of the upgrades may have not been successful and
he should follow up on them. Otherwise, user may not notice them at all.

ipa-upgradeconfig logging has been made consistent with ipa-ldap-updater
logging - only error level or higher severity log messages are printed
to stderr, with the same console format. A new debug log that an upgrade
script has started was added to make log investigation easier.

https://fedorahosted.org/freeipa/ticket/3157

---

Reproducer is in Bugzilla attached to the ticket. With this patch, RPM update
will report errors to user:

# rpm -Uvh --force ~/freeipa-master/dist/rpms/freeipa-*
Preparing...### [100%]
 1:freeipa-python ### [ 14%]
 2:freeipa-client ### [ 29%]
 3:freeipa-admintools ### [ 43%]
 4:freeipa-server ### [ 57%]
ERROR: Cannot update connections in /etc/named.conf: [Errno 13] Permission
denied: '/etc/named.conf'
 5:freeipa-server-selinux ### [ 71%]
 6:freeipa-server-trust-ad### [ 86%]
 7:freeipa-debuginfo  ### [100%]

Martin


Can you add an option to run in info mode (the equivalent of verbose=True)?
Otherwise running from the cli returns nothing unless there is an error, I like
some amount of output myself.

rob



ipa-upgradeconfig has a --debug option. I doubt that the output can be more
verbose :-)

Martin



Yeah, but there is no middle ground. You either get everything or nothing.

rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] 323 Report ipa-upgradeconfig errors during RPM upgrade

2012-10-17 Thread Martin Kosek
Report errors just like with ipa-ldap-updater. These messages should warn
user that some parts of the upgrades may have not been successful and
he should follow up on them. Otherwise, user may not notice them at all.

ipa-upgradeconfig logging has been made consistent with ipa-ldap-updater
logging - only error level or higher severity log messages are printed
to stderr, with the same console format. A new debug log that an upgrade
script has started was added to make log investigation easier.

https://fedorahosted.org/freeipa/ticket/3157

---

Reproducer is in Bugzilla attached to the ticket. With this patch, RPM update
will report errors to user:

# rpm -Uvh --force ~/freeipa-master/dist/rpms/freeipa-*
Preparing...### [100%]
   1:freeipa-python ### [ 14%]
   2:freeipa-client ### [ 29%]
   3:freeipa-admintools ### [ 43%]
   4:freeipa-server ### [ 57%]
ERROR: Cannot update connections in /etc/named.conf: [Errno 13] Permission
denied: '/etc/named.conf'
   5:freeipa-server-selinux ### [ 71%]
   6:freeipa-server-trust-ad### [ 86%]
   7:freeipa-debuginfo  ### [100%]

Martin
From bcc791c27a55a98d051d6920a8fbb2ad9a4f1d10 Mon Sep 17 00:00:00 2001
From: Martin Kosek mko...@redhat.com
Date: Wed, 17 Oct 2012 13:05:24 +0200
Subject: [PATCH] Report ipa-upgradeconfig errors during RPM upgrade

Report errors just like with ipa-ldap-updater. These messages should warn
user that some parts of the upgrades may have not been successful and
he should follow up on them. Otherwise, user may not notice them at all.

ipa-upgradeconfig logging has been made consistent with ipa-ldap-updater
logging - only error level or higher severity log messages are printed
to stderr, with the same console format. A new debug log that an upgrade
script has started was added to make log investigation easier.

https://fedorahosted.org/freeipa/ticket/3157
---
 freeipa.spec.in | 5 -
 install/tools/ipa-upgradeconfig | 5 +++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 060f09b12e6891defc8cb00d4f52a0d019198a70..4a0190cf5f98afbd61237e414b105d74d9489932 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -493,7 +493,7 @@ if [ $1 = 1 ]; then
 fi
 %endif
 if [ $1 -gt 1 ] ; then
-/usr/sbin/ipa-upgradeconfig /dev/null 21 || :
+/usr/sbin/ipa-upgradeconfig /dev/null || :
 fi
 
 %posttrans server
@@ -815,6 +815,9 @@ fi
 %ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt
 
 %changelog
+* Wed Oct 17 2012 Martin Kosek mko...@redhat.com - 2.99.0-51
+- Print ipa-upgradeconfig errors during RPM update
+
 * Wed Oct 10 2012 Alexander Bokovoy aboko...@redhat.com - 2.99.0-50
 - Make sure server-trust-ad subpackage alternates winbind_krb5_locator.so
   plugin to /dev/null since they cannot be used when trusts are configured
diff --git a/install/tools/ipa-upgradeconfig b/install/tools/ipa-upgradeconfig
index 38426149864017789614095445f947a997d63b3c..cae0de8e15baaadf3e0973370356ab4e0ebc5420 100644
--- a/install/tools/ipa-upgradeconfig
+++ b/install/tools/ipa-upgradeconfig
@@ -577,9 +577,10 @@ def main():
 
 safe_options, options = parse_options()
 
-standard_logging_setup('/var/log/ipaupgrade.log', verbose=True,
-debug=options.debug, console_format='%(message)s',
+standard_logging_setup('/var/log/ipaupgrade.log', debug=options.debug,
+console_format='%(levelname)s: %(message)s',
 filemode='a')
+root_logger.debug('%s was invoked with options: %s' % (sys.argv[0], safe_options))
 
 fstore = sysrestore.FileStore('/var/lib/ipa/sysrestore')
 
-- 
1.7.11.7

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel