Re: [Freeipa-devel] [PATCH 0018] Make service naming in ipa-server-install consistent

2012-10-22 Thread Tomas Babej

On 10/19/2012 03:16 PM, Martin Kosek wrote:

On 10/19/2012 02:49 PM, Tomas Babej wrote:

On 10/19/2012 01:44 PM, Martin Kosek wrote:

On 10/19/2012 01:26 PM, Tomas Babej wrote:

On 10/18/2012 11:27 AM, Martin Kosek wrote:

On 10/11/2012 05:11 PM, Tomas Babej wrote:

On 10/11/2012 12:32 PM, Martin Kosek wrote:

On 10/11/2012 12:26 PM, Tomas Babej wrote:

Hi,

This patch forces more consistency into ipa-server-install output. All
descriptions of services that are not instances of
SimpleServiceInstance are now in the following format:

Description (Service Name)

Furthermore, start_creation method has been modified to support
custom start and end messages.

Sample output produced by this patch attached.

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

Tomas


Just based on reading the patch, this does not look right:

-self.start_creation(Configuring certificate server, 210)
+self.start_creation(Configuring directory server for the CA,
+end_message=Done configuring directory server for the CA,
+show_service_name=True, runtime=210)

Martin


Thanks, glitch fixed.

Tomas

Ok, I managed to get the patch a proper review. I like the result, in the
console, but I still not entirely satisfied with the patch, looks
over-engineered to me + there is a lot of duplication with Configuring
%(service)s and Done configuring %(service)s messages.

These messages could be easily generated only based on name of a service
(self.service_name, we got that) and a new friendly service name or
description.

If we add description this way:

class KrbInstance(service.Service):
   def __init__(self, fstore=None):
   service.Service.__init__(self, krb5kdc, description=Kerberos
KDC)
...

the start_creation could be very simple:
...
self.start_creation(runtime=30)
...

All messages could be simply generated by the Service class just based on
self.service_name and self.description with having the same output as you do
now.

Martin

I simplified the approach as you suggested. However, I kept optional
start_message and end_message parameters in case we would want
to specify the messages instead of using the pre-generated ones.
This is used in baseupdate.py and upgradeinstance.py

More info in the documentation of start_creation() function.

Tomas

NACK. Tried running ./make-lint with your patch, got thousands of errors...

More like one error thousand times :) I somehow botched up rebasing
the patch, I swear that I corrected that indentation issue beforehand.
Nevermind, thanks for checking. ./make-lint runs clean now :)

But the approach looks OK, I am just thinking that default value for
show_service_name of start_creation() should be True as it is the most widely
used value - you would not have to specify it everytime you call
start_creation() in *instance.py files.

Martin

Default values switched.

Tomas

NACK. Server installation crashed with the first step:

# ipa-server-install

Configuring NTP daemon (ntpd)
   [1/4]: stopping ntpd
   [2/4]: writing configuration
   [3/4]: configuring ntpd to start on boot
   [4/4]: starting ntpd
Unexpected error - see /var/log/ipaserver-install.log for details:
TypeError: expected a character buffer object


ipaserver-install.log:

2012-10-19T12:59:37Z INFO   File
/usr/lib/python2.7/site-packages/ipaserver/install/installutils.py,  line
614, in run_script
 return_value = main_function()

   File /sbin/ipa-server-install, line 904, in main
 ntp.create_instance()

   File /usr/lib/python2.7/site-packages/ipaserver/install/ntpinstance.py,
line 158, in create_instance
 self.start_creation()

   File /usr/lib/python2.7/site-packages/ipaserver/install/service.py, line
358, in start_creation
 self.print_msg(end_message)

   File /usr/lib/python2.7/site-packages/ipaserver/install/service.py, line
295, in print_msg
 print_msg(message, self.output_fd)

   File /usr/lib/python2.7/site-packages/ipaserver/install/service.py, line
60, in print_msg
 output_fd.write(message)

2012-10-19T12:59:37Z INFO The ipa-server-install command failed, exception:
TypeError: expected a   character buffer object


Martin
I also encountered this beforehand. Due to the unfortunate rebase, I 
retested

the whole patch once again, to make sure there are no such errors that I
considered fixed still lurking.
This should work now.

Tomas
From 60ecefdfb7acdad253deca1a8f747eb77c2c767f Mon Sep 17 00:00:00 2001
From: Tomas Babej tba...@redhat.com
Date: Thu, 11 Oct 2012 03:32:17 -0400
Subject: [PATCH] Make service naming in ipa-server-install consistent

Forces more consistency into ipa-server-install output. All
descriptions of services that are not instances of
SimpleServiceInstance are now in the following format:

Description (Service Name)

Furthermore, start_creation method has been modified to support
custom start and end messages. See documentation for more info.

https://fedorahosted.org/freeipa/ticket/3059
---
 ipaserver/install/adtrustinstance.py|  

Re: [Freeipa-devel] [PATCH 0018] Make service naming in ipa-server-install consistent

2012-10-19 Thread Tomas Babej

On 10/18/2012 11:27 AM, Martin Kosek wrote:

On 10/11/2012 05:11 PM, Tomas Babej wrote:

On 10/11/2012 12:32 PM, Martin Kosek wrote:

On 10/11/2012 12:26 PM, Tomas Babej wrote:

Hi,

This patch forces more consistency into ipa-server-install output. All
descriptions of services that are not instances of
SimpleServiceInstance are now in the following format:

Description (Service Name)

Furthermore, start_creation method has been modified to support
custom start and end messages.

Sample output produced by this patch attached.

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

Tomas


Just based on reading the patch, this does not look right:

-self.start_creation(Configuring certificate server, 210)
+self.start_creation(Configuring directory server for the CA,
+end_message=Done configuring directory server for the CA,
+show_service_name=True, runtime=210)

Martin


Thanks, glitch fixed.

Tomas

Ok, I managed to get the patch a proper review. I like the result, in the
console, but I still not entirely satisfied with the patch, looks
over-engineered to me + there is a lot of duplication with Configuring
%(service)s and Done configuring %(service)s messages.

These messages could be easily generated only based on name of a service
(self.service_name, we got that) and a new friendly service name or 
description.

If we add description this way:

class KrbInstance(service.Service):
 def __init__(self, fstore=None):
 service.Service.__init__(self, krb5kdc, description=Kerberos KDC)
...

the start_creation could be very simple:
...
self.start_creation(runtime=30)
...

All messages could be simply generated by the Service class just based on
self.service_name and self.description with having the same output as you do 
now.

Martin

I simplified the approach as you suggested. However, I kept optional
start_message and end_message parameters in case we would want
to specify the messages instead of using the pre-generated ones.
This is used in baseupdate.py and upgradeinstance.py

More info in the documentation of start_creation() function.

Tomas
From 243d582d085f9ecf468d99ddf1fc6cb11db9533f Mon Sep 17 00:00:00 2001
From: Tomas Babej tba...@redhat.com
Date: Thu, 11 Oct 2012 03:32:17 -0400
Subject: [PATCH] Make service naming in ipa-server-install consistent

Forces more consistency into ipa-server-install output. All
descriptions of services that are not instances of
SimpleServiceInstance are now in the following format:

Description (Service Name)

Furthermore, start_creation method has been modified to support
custom start and end messages. See documentation for more info.

https://fedorahosted.org/freeipa/ticket/3059
---
 ipaserver/install/adtrustinstance.py|  4 +--
 ipaserver/install/bindinstance.py   |  9 +--
 ipaserver/install/cainstance.py | 18 +++---
 ipaserver/install/dsinstance.py | 11 ++---
 ipaserver/install/httpinstance.py   |  4 +--
 ipaserver/install/krbinstance.py|  6 ++---
 ipaserver/install/ntpinstance.py|  4 +--
 ipaserver/install/plugins/baseupdate.py |  2 +-
 ipaserver/install/service.py| 44 +++--
 ipaserver/install/upgradeinstance.py|  2 +-
 10 files changed, 77 insertions(+), 27 deletions(-)

diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py
index b3602ddce7fa1c184bdf1283e67b50463e49c5fd..41edeac47e403491b0a55ffeeebb1072549262d5 100644
--- a/ipaserver/install/adtrustinstance.py
+++ b/ipaserver/install/adtrustinstance.py
@@ -132,7 +132,7 @@ class ADTRUSTInstance(service.Service):
 self.rid_base = None
 self.secondary_rid_base = None
 
-service.Service.__init__(self, smb, dm_password=None, ldapi=True)
+service.Service.__init__(self, smb, service_desc=CIFS, dm_password=None, ldapi=True)
 
 if fstore:
 self.fstore = fstore
@@ -757,7 +757,7 @@ class ADTRUSTInstance(service.Service):
 self.step(adding SIDs to existing users and groups,
   self.__add_sids)
 
-self.start_creation(Configuring CIFS:)
+self.start_creation()
 
 def uninstall(self):
 if self.is_configured():
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index f43a9ff0f9114388ae072daa82c39aaff716f7b2..56bc8686a8fd6dbbcde5af1e67ef5095f96be50e 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -409,7 +409,12 @@ class DnsBackup(object):
 
 class BindInstance(service.Service):
 def __init__(self, fstore=None, dm_password=None):
-service.Service.__init__(self, named, dm_password=dm_password, ldapi=False, autobind=service.DISABLED)
+service.Service.__init__(self, named,
+service_desc=DNS,
+dm_password=dm_password,
+ldapi=False,
+autobind=service.DISABLED
+)
 self.dns_backup = 

Re: [Freeipa-devel] [PATCH 0018] Make service naming in ipa-server-install consistent

2012-10-19 Thread Martin Kosek
On 10/19/2012 01:26 PM, Tomas Babej wrote:
 On 10/18/2012 11:27 AM, Martin Kosek wrote:
 On 10/11/2012 05:11 PM, Tomas Babej wrote:
 On 10/11/2012 12:32 PM, Martin Kosek wrote:
 On 10/11/2012 12:26 PM, Tomas Babej wrote:
 Hi,

 This patch forces more consistency into ipa-server-install output. All
 descriptions of services that are not instances of
 SimpleServiceInstance are now in the following format:

 Description (Service Name)

 Furthermore, start_creation method has been modified to support
 custom start and end messages.

 Sample output produced by this patch attached.

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

 Tomas

 Just based on reading the patch, this does not look right:

 -self.start_creation(Configuring certificate server, 210)
 +self.start_creation(Configuring directory server for the CA,
 +end_message=Done configuring directory server for the CA,
 +show_service_name=True, runtime=210)

 Martin

 Thanks, glitch fixed.

 Tomas
 Ok, I managed to get the patch a proper review. I like the result, in the
 console, but I still not entirely satisfied with the patch, looks
 over-engineered to me + there is a lot of duplication with Configuring
 %(service)s and Done configuring %(service)s messages.

 These messages could be easily generated only based on name of a service
 (self.service_name, we got that) and a new friendly service name or
 description.

 If we add description this way:

 class KrbInstance(service.Service):
  def __init__(self, fstore=None):
  service.Service.__init__(self, krb5kdc, description=Kerberos 
 KDC)
 ...

 the start_creation could be very simple:
 ...
 self.start_creation(runtime=30)
 ...

 All messages could be simply generated by the Service class just based on
 self.service_name and self.description with having the same output as you do
 now.

 Martin
 I simplified the approach as you suggested. However, I kept optional
 start_message and end_message parameters in case we would want
 to specify the messages instead of using the pre-generated ones.
 This is used in baseupdate.py and upgradeinstance.py
 
 More info in the documentation of start_creation() function.
 
 Tomas

NACK. Tried running ./make-lint with your patch, got thousands of errors...

But the approach looks OK, I am just thinking that default value for
show_service_name of start_creation() should be True as it is the most widely
used value - you would not have to specify it everytime you call
start_creation() in *instance.py files.

Martin

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


Re: [Freeipa-devel] [PATCH 0018] Make service naming in ipa-server-install consistent

2012-10-19 Thread Tomas Babej

On 10/19/2012 01:44 PM, Martin Kosek wrote:

On 10/19/2012 01:26 PM, Tomas Babej wrote:

On 10/18/2012 11:27 AM, Martin Kosek wrote:

On 10/11/2012 05:11 PM, Tomas Babej wrote:

On 10/11/2012 12:32 PM, Martin Kosek wrote:

On 10/11/2012 12:26 PM, Tomas Babej wrote:

Hi,

This patch forces more consistency into ipa-server-install output. All
descriptions of services that are not instances of
SimpleServiceInstance are now in the following format:

Description (Service Name)

Furthermore, start_creation method has been modified to support
custom start and end messages.

Sample output produced by this patch attached.

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

Tomas


Just based on reading the patch, this does not look right:

-self.start_creation(Configuring certificate server, 210)
+self.start_creation(Configuring directory server for the CA,
+end_message=Done configuring directory server for the CA,
+show_service_name=True, runtime=210)

Martin


Thanks, glitch fixed.

Tomas

Ok, I managed to get the patch a proper review. I like the result, in the
console, but I still not entirely satisfied with the patch, looks
over-engineered to me + there is a lot of duplication with Configuring
%(service)s and Done configuring %(service)s messages.

These messages could be easily generated only based on name of a service
(self.service_name, we got that) and a new friendly service name or
description.

If we add description this way:

class KrbInstance(service.Service):
  def __init__(self, fstore=None):
  service.Service.__init__(self, krb5kdc, description=Kerberos KDC)
...

the start_creation could be very simple:
...
self.start_creation(runtime=30)
...

All messages could be simply generated by the Service class just based on
self.service_name and self.description with having the same output as you do
now.

Martin

I simplified the approach as you suggested. However, I kept optional
start_message and end_message parameters in case we would want
to specify the messages instead of using the pre-generated ones.
This is used in baseupdate.py and upgradeinstance.py

More info in the documentation of start_creation() function.

Tomas

NACK. Tried running ./make-lint with your patch, got thousands of errors...

More like one error thousand times :) I somehow botched up rebasing
the patch, I swear that I corrected that indentation issue beforehand.
Nevermind, thanks for checking. ./make-lint runs clean now :)


But the approach looks OK, I am just thinking that default value for
show_service_name of start_creation() should be True as it is the most widely
used value - you would not have to specify it everytime you call
start_creation() in *instance.py files.

Martin

Default values switched.

Tomas
From 6b510c128aec1d78e6326a96be959cd33b06df8a Mon Sep 17 00:00:00 2001
From: Tomas Babej tba...@redhat.com
Date: Thu, 11 Oct 2012 03:32:17 -0400
Subject: [PATCH] Make service naming in ipa-server-install consistent

Forces more consistency into ipa-server-install output. All
descriptions of services that are not instances of
SimpleServiceInstance are now in the following format:

Description (Service Name)

Furthermore, start_creation method has been modified to support
custom start and end messages. See documentation for more info.

https://fedorahosted.org/freeipa/ticket/3059
---
 ipaserver/install/adtrustinstance.py|  4 +--
 ipaserver/install/bindinstance.py   |  9 +--
 ipaserver/install/cainstance.py | 18 ++---
 ipaserver/install/dsinstance.py | 11 +---
 ipaserver/install/httpinstance.py   |  4 +--
 ipaserver/install/krbinstance.py|  6 ++---
 ipaserver/install/ntpinstance.py|  4 +--
 ipaserver/install/plugins/baseupdate.py |  3 ++-
 ipaserver/install/service.py| 45 -
 ipaserver/install/upgradeinstance.py|  3 ++-
 10 files changed, 80 insertions(+), 27 deletions(-)

diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py
index b3602ddce7fa1c184bdf1283e67b50463e49c5fd..c27fac99cf624ca6460ce84e76be52db38f11a5b 100644
--- a/ipaserver/install/adtrustinstance.py
+++ b/ipaserver/install/adtrustinstance.py
@@ -132,7 +132,7 @@ class ADTRUSTInstance(service.Service):
 self.rid_base = None
 self.secondary_rid_base = None
 
-service.Service.__init__(self, smb, dm_password=None, ldapi=True)
+service.Service.__init__(self, smb, service_desc=CIFS, dm_password=None, ldapi=True)
 
 if fstore:
 self.fstore = fstore
@@ -757,7 +757,7 @@ class ADTRUSTInstance(service.Service):
 self.step(adding SIDs to existing users and groups,
   self.__add_sids)
 
-self.start_creation(Configuring CIFS:)
+self.start_creation(show_service_name=False)
 
 def uninstall(self):
 if self.is_configured():
diff --git a/ipaserver/install/bindinstance.py 

Re: [Freeipa-devel] [PATCH 0018] Make service naming in ipa-server-install consistent

2012-10-19 Thread Martin Kosek
On 10/19/2012 02:49 PM, Tomas Babej wrote:
 On 10/19/2012 01:44 PM, Martin Kosek wrote:
 On 10/19/2012 01:26 PM, Tomas Babej wrote:
 On 10/18/2012 11:27 AM, Martin Kosek wrote:
 On 10/11/2012 05:11 PM, Tomas Babej wrote:
 On 10/11/2012 12:32 PM, Martin Kosek wrote:
 On 10/11/2012 12:26 PM, Tomas Babej wrote:
 Hi,

 This patch forces more consistency into ipa-server-install output. All
 descriptions of services that are not instances of
 SimpleServiceInstance are now in the following format:

 Description (Service Name)

 Furthermore, start_creation method has been modified to support
 custom start and end messages.

 Sample output produced by this patch attached.

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

 Tomas

 Just based on reading the patch, this does not look right:

 -self.start_creation(Configuring certificate server, 210)
 +self.start_creation(Configuring directory server for the CA,
 +end_message=Done configuring directory server for the CA,
 +show_service_name=True, runtime=210)

 Martin

 Thanks, glitch fixed.

 Tomas
 Ok, I managed to get the patch a proper review. I like the result, in the
 console, but I still not entirely satisfied with the patch, looks
 over-engineered to me + there is a lot of duplication with Configuring
 %(service)s and Done configuring %(service)s messages.

 These messages could be easily generated only based on name of a service
 (self.service_name, we got that) and a new friendly service name or
 description.

 If we add description this way:

 class KrbInstance(service.Service):
   def __init__(self, fstore=None):
   service.Service.__init__(self, krb5kdc, description=Kerberos
 KDC)
 ...

 the start_creation could be very simple:
 ...
 self.start_creation(runtime=30)
 ...

 All messages could be simply generated by the Service class just based on
 self.service_name and self.description with having the same output as you 
 do
 now.

 Martin
 I simplified the approach as you suggested. However, I kept optional
 start_message and end_message parameters in case we would want
 to specify the messages instead of using the pre-generated ones.
 This is used in baseupdate.py and upgradeinstance.py

 More info in the documentation of start_creation() function.

 Tomas
 NACK. Tried running ./make-lint with your patch, got thousands of errors...
 More like one error thousand times :) I somehow botched up rebasing
 the patch, I swear that I corrected that indentation issue beforehand.
 Nevermind, thanks for checking. ./make-lint runs clean now :)

 But the approach looks OK, I am just thinking that default value for
 show_service_name of start_creation() should be True as it is the most widely
 used value - you would not have to specify it everytime you call
 start_creation() in *instance.py files.

 Martin
 Default values switched.
 
 Tomas

NACK. Server installation crashed with the first step:

# ipa-server-install

Configuring NTP daemon (ntpd)
  [1/4]: stopping ntpd
  [2/4]: writing configuration
  [3/4]: configuring ntpd to start on boot
  [4/4]: starting ntpd
Unexpected error - see /var/log/ipaserver-install.log for details:
TypeError: expected a character buffer object


ipaserver-install.log:

2012-10-19T12:59:37Z INFO   File
/usr/lib/python2.7/site-packages/ipaserver/install/installutils.py,  line
614, in run_script
return_value = main_function()

  File /sbin/ipa-server-install, line 904, in main
ntp.create_instance()

  File /usr/lib/python2.7/site-packages/ipaserver/install/ntpinstance.py,
line 158, in create_instance
self.start_creation()

  File /usr/lib/python2.7/site-packages/ipaserver/install/service.py, line
358, in start_creation
self.print_msg(end_message)

  File /usr/lib/python2.7/site-packages/ipaserver/install/service.py, line
295, in print_msg
print_msg(message, self.output_fd)

  File /usr/lib/python2.7/site-packages/ipaserver/install/service.py, line
60, in print_msg
output_fd.write(message)

2012-10-19T12:59:37Z INFO The ipa-server-install command failed, exception:
TypeError: expected a   character buffer object


Martin

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


Re: [Freeipa-devel] [PATCH 0018] Make service naming in ipa-server-install consistent

2012-10-18 Thread Martin Kosek
On 10/11/2012 05:11 PM, Tomas Babej wrote:
 On 10/11/2012 12:32 PM, Martin Kosek wrote:
 On 10/11/2012 12:26 PM, Tomas Babej wrote:
 Hi,

 This patch forces more consistency into ipa-server-install output. All
 descriptions of services that are not instances of
 SimpleServiceInstance are now in the following format:

 Description (Service Name)

 Furthermore, start_creation method has been modified to support
 custom start and end messages.

 Sample output produced by this patch attached.

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

 Tomas

 Just based on reading the patch, this does not look right:

 -self.start_creation(Configuring certificate server, 210)
 +self.start_creation(Configuring directory server for the CA,
 +end_message=Done configuring directory server for the CA,
 +show_service_name=True, runtime=210)

 Martin

 Thanks, glitch fixed.
 
 Tomas

Ok, I managed to get the patch a proper review. I like the result, in the
console, but I still not entirely satisfied with the patch, looks
over-engineered to me + there is a lot of duplication with Configuring
%(service)s and Done configuring %(service)s messages.

These messages could be easily generated only based on name of a service
(self.service_name, we got that) and a new friendly service name or 
description.

If we add description this way:

class KrbInstance(service.Service):
def __init__(self, fstore=None):
service.Service.__init__(self, krb5kdc, description=Kerberos KDC)
...

the start_creation could be very simple:
...
self.start_creation(runtime=30)
...

All messages could be simply generated by the Service class just based on
self.service_name and self.description with having the same output as you do 
now.

Martin

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


[Freeipa-devel] [PATCH 0018] Make service naming in ipa-server-install consistent

2012-10-11 Thread Tomas Babej

Hi,

This patch forces more consistency into ipa-server-install output. All
descriptions of services that are not instances of
SimpleServiceInstance are now in the following format:

Description (Service Name)

Furthermore, start_creation method has been modified to support
custom start and end messages.

Sample output produced by this patch attached.

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

Tomas
From 8614544d08b1b2b4e85156bebbe629215fb14915 Mon Sep 17 00:00:00 2001
From: Tomas Babej tba...@redhat.com
Date: Thu, 11 Oct 2012 03:32:17 -0400
Subject: [PATCH] Make service naming in ipa-server-install consistent

Forces more consistency into ipa-server-install output. All
descriptions of services that are not instances of
SimpleServiceInstance are now in the following format:

Description (Service Name)

Furthermore, start_creation method has been modified to support
custom start and end messages.

https://fedorahosted.org/freeipa/ticket/3059
---
 ipaserver/install/adtrustinstance.py |  3 ++-
 ipaserver/install/bindinstance.py|  4 +++-
 ipaserver/install/cainstance.py  |  8 ++--
 ipaserver/install/dsinstance.py  |  8 ++--
 ipaserver/install/httpinstance.py|  4 +++-
 ipaserver/install/krbinstance.py |  8 ++--
 ipaserver/install/ntpinstance.py |  4 +++-
 ipaserver/install/service.py | 22 --
 8 files changed, 45 insertions(+), 16 deletions(-)

diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py
index b74f4b685b1cb56bdcdbae15ab6a8f38960bfc66..971f47f347a2f054cb76fc5b9e0e7d9f99cef239 100644
--- a/ipaserver/install/adtrustinstance.py
+++ b/ipaserver/install/adtrustinstance.py
@@ -757,7 +757,8 @@ class ADTRUSTInstance(service.Service):
 self.step(adding SIDs to existing users and groups,
   self.__add_sids)
 
-self.start_creation(Configuring CIFS:)
+self.start_creation(Configuring CIFS,
+end_message=Done configuring CIFS)
 
 def uninstall(self):
 if self.is_configured():
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index f43a9ff0f9114388ae072daa82c39aaff716f7b2..67400082278258a2853d54c4df68d00318c20da8 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -505,7 +505,9 @@ class BindInstance(service.Service):
 self.step(configuring named to start on boot, self.__enable)
 
 self.step(changing resolv.conf to point to ourselves, self.__setup_resolv_conf)
-self.start_creation(Configuring named:)
+self.start_creation(Configuring DNS,
+end_message = Done configuring DNS,
+show_service_name=True)
 
 def __start(self):
 try:
diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
index aabbba39de95937153ebebef79bf8b9082d2e46e..633b64c60bf16b8fc711d2883ecabd15f6818792 100644
--- a/ipaserver/install/cainstance.py
+++ b/ipaserver/install/cainstance.py
@@ -277,7 +277,9 @@ class CADSInstance(service.Service):
 self.step(creating directory server instance, self.__create_instance)
 self.step(restarting directory server, self.restart_instance)
 
-self.start_creation(Configuring directory server for the CA, 30)
+self.start_creation(Configuring directory server for the CA,
+end_message=Done configuring directory server for the CA,
+show_service_name=True, runtime=30)
 
 def __setup_sub_dict(self):
 server_root = dsinstance.find_server_root()
@@ -576,7 +578,9 @@ class CAInstance(service.Service):
 self.step(configure Server-Cert certificate renewal, self.track_servercert)
 self.step(Configure HTTP to proxy connections, self.__http_proxy)
 
-self.start_creation(Configuring certificate server, 210)
+self.start_creation(Configuring directory server for the CA,
+end_message=Done configuring directory server for the CA,
+show_service_name=True, runtime=210)
 
 def __spawn_instance(self):
 
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index 2c9832d0277560ea85bdc29c7167a46430c78771..849661a1ec4bdb940d745b82a9631f64bf546e93 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -255,7 +255,9 @@ class DsInstance(service.Service):
 
 self.__common_post_setup()
 
-self.start_creation(Configuring directory server, 60)
+self.start_creation(Configuring directory server,
+end_message=Done configuring directory server,
+show_service_name=True, runtime=60)
 
 def create_replica(self, realm_name, master_fqdn, fqdn,
domain_name, dm_password, pkcs12_info=None):
@@ -289,7 +291,9 @@ class DsInstance(service.Service):
 
 self.__common_post_setup()
 
-self.start_creation(Configuring directory server, 60)
+

Re: [Freeipa-devel] [PATCH 0018] Make service naming in ipa-server-install consistent

2012-10-11 Thread Martin Kosek
On 10/11/2012 12:26 PM, Tomas Babej wrote:
 Hi,
 
 This patch forces more consistency into ipa-server-install output. All
 descriptions of services that are not instances of
 SimpleServiceInstance are now in the following format:
 
 Description (Service Name)
 
 Furthermore, start_creation method has been modified to support
 custom start and end messages.
 
 Sample output produced by this patch attached.
 
 https://fedorahosted.org/freeipa/ticket/3059
 
 Tomas
 

Just based on reading the patch, this does not look right:

-self.start_creation(Configuring certificate server, 210)
+self.start_creation(Configuring directory server for the CA,
+end_message=Done configuring directory server for the CA,
+show_service_name=True, runtime=210)

Martin

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


Re: [Freeipa-devel] [PATCH 0018] Make service naming in ipa-server-install consistent

2012-10-11 Thread Tomas Babej

On 10/11/2012 12:32 PM, Martin Kosek wrote:

On 10/11/2012 12:26 PM, Tomas Babej wrote:

Hi,

This patch forces more consistency into ipa-server-install output. All
descriptions of services that are not instances of
SimpleServiceInstance are now in the following format:

Description (Service Name)

Furthermore, start_creation method has been modified to support
custom start and end messages.

Sample output produced by this patch attached.

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

Tomas


Just based on reading the patch, this does not look right:

-self.start_creation(Configuring certificate server, 210)
+self.start_creation(Configuring directory server for the CA,
+end_message=Done configuring directory server for the CA,
+show_service_name=True, runtime=210)

Martin


Thanks, glitch fixed.

Tomas
From c6583949049ec0aa96ada54efe4b30055477bb59 Mon Sep 17 00:00:00 2001
From: Tomas Babej tba...@redhat.com
Date: Thu, 11 Oct 2012 03:32:17 -0400
Subject: [PATCH] Make service naming in ipa-server-install consistent

Forces more consistency into ipa-server-install output. All
descriptions of services that are not instances of
SimpleServiceInstance are now in the following format:

Description (Service Name)

Furthermore, start_creation method has been modified to support
custom start and end messages.

https://fedorahosted.org/freeipa/ticket/3059
---
 ipaserver/install/adtrustinstance.py |  3 ++-
 ipaserver/install/bindinstance.py|  4 +++-
 ipaserver/install/cainstance.py  |  8 ++--
 ipaserver/install/dsinstance.py  |  8 ++--
 ipaserver/install/httpinstance.py|  4 +++-
 ipaserver/install/krbinstance.py |  8 ++--
 ipaserver/install/ntpinstance.py |  4 +++-
 ipaserver/install/service.py | 22 --
 8 files changed, 45 insertions(+), 16 deletions(-)

diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py
index b74f4b685b1cb56bdcdbae15ab6a8f38960bfc66..971f47f347a2f054cb76fc5b9e0e7d9f99cef239 100644
--- a/ipaserver/install/adtrustinstance.py
+++ b/ipaserver/install/adtrustinstance.py
@@ -757,7 +757,8 @@ class ADTRUSTInstance(service.Service):
 self.step(adding SIDs to existing users and groups,
   self.__add_sids)
 
-self.start_creation(Configuring CIFS:)
+self.start_creation(Configuring CIFS,
+end_message=Done configuring CIFS)
 
 def uninstall(self):
 if self.is_configured():
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index f43a9ff0f9114388ae072daa82c39aaff716f7b2..67400082278258a2853d54c4df68d00318c20da8 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -505,7 +505,9 @@ class BindInstance(service.Service):
 self.step(configuring named to start on boot, self.__enable)
 
 self.step(changing resolv.conf to point to ourselves, self.__setup_resolv_conf)
-self.start_creation(Configuring named:)
+self.start_creation(Configuring DNS,
+end_message = Done configuring DNS,
+show_service_name=True)
 
 def __start(self):
 try:
diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
index aabbba39de95937153ebebef79bf8b9082d2e46e..0a8f603497693392ee4a73caea10cf13e4a36f09 100644
--- a/ipaserver/install/cainstance.py
+++ b/ipaserver/install/cainstance.py
@@ -277,7 +277,9 @@ class CADSInstance(service.Service):
 self.step(creating directory server instance, self.__create_instance)
 self.step(restarting directory server, self.restart_instance)
 
-self.start_creation(Configuring directory server for the CA, 30)
+self.start_creation(Configuring directory server for the CA,
+end_message=Done configuring directory server for the CA,
+show_service_name=True, runtime=210)
 
 def __setup_sub_dict(self):
 server_root = dsinstance.find_server_root()
@@ -576,7 +578,9 @@ class CAInstance(service.Service):
 self.step(configure Server-Cert certificate renewal, self.track_servercert)
 self.step(Configure HTTP to proxy connections, self.__http_proxy)
 
-self.start_creation(Configuring certificate server, 210)
+self.start_creation(Configuring certificate server,
+end_message=Done configuring certificate server,
+show_service_name=True, runtime=30)
 
 def __spawn_instance(self):
 
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index 2c9832d0277560ea85bdc29c7167a46430c78771..849661a1ec4bdb940d745b82a9631f64bf546e93 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -255,7 +255,9 @@ class DsInstance(service.Service):
 
 self.__common_post_setup()
 
-self.start_creation(Configuring directory server, 60)
+self.start_creation(Configuring directory