Re: [Freeipa-devel] [PATCH] 033 Add new installer option for reverse zone creation

2011-01-07 Thread Simo Sorce

On Fri, 2011-01-07 at 04:52 -0500, Simo Sorce wrote:
> On Thu, 2011-01-06 at 19:43 +0100, Jakub Hrozek wrote:
> > 
> > On reading the complete discussion (thanks for reminding me, Dmitri),
> > we
> > only flip the default for the reverse zone creation to True. Attached
> > is
> > a patch that has a --no-reverse option instead of --create-reverse and
> > reverts the default in the installer.
> 
> ACK.

I've fixed a simple conflict in ipa-dns-install that was generated by
one of my patches and pushed to master.

Simo.

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


Re: [Freeipa-devel] [PATCH] 033 Add new installer option for reverse zone creation

2011-01-07 Thread Simo Sorce
On Thu, 2011-01-06 at 19:43 +0100, Jakub Hrozek wrote:
> 
> On reading the complete discussion (thanks for reminding me, Dmitri),
> we
> only flip the default for the reverse zone creation to True. Attached
> is
> a patch that has a --no-reverse option instead of --create-reverse and
> reverts the default in the installer.

ACK.

Simo.

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


Re: [Freeipa-devel] [PATCH] 033 Add new installer option for reverse zone creation

2011-01-06 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/06/2011 06:31 PM, Jakub Hrozek wrote:
> On 01/05/2011 05:52 PM, Dmitri Pal wrote:
>> Jan Zelený wrote:
>>> Jakub Hrozek  wrote:
>>>   
 On 01/05/2011 01:09 PM, Jan Zelený wrote:
 
> Jakub Hrozek  wrote:
>   
>> ticket #678
>> 
> Nack, the unattended option given to the create_reverse function is
> redundant, please remove it.
>
> Jan
>   
 OK, new patch attached.
 
>>>
>>> ack
>>>
>>>   
>> Jenny had some questions about the default value. Please hold off
>> pushing before you reconcile with her.
> 
> 
> 
> Based on recent discussion, I am withdrawing this patch and will prepare
> a new one that will set up DNS by default, introduce a new option
> --no-dns instead and also introduce --uninstall to ipa-dns-install.
> 
>   Jakub

On reading the complete discussion (thanks for reminding me, Dmitri), we
only flip the default for the reverse zone creation to True. Attached is
a patch that has a --no-reverse option instead of --create-reverse and
reverts the default in the installer.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk0mDTYACgkQHsardTLnvCUMWQCeNYao4fZ83QHBsmZYnP7C67R7
3NIAoJlJQZbkaZADzo19iOnLKxo+ilfz
=71kA
-END PGP SIGNATURE-
From 02e5e7944cc8dca6442e1077e8949c2a78e001a0 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek 
Date: Tue, 4 Jan 2011 08:55:47 -0500
Subject: [PATCH] Create the reverse zone by default

A new option to specify reverse zone creation for unattended installs

https://fedorahosted.org/freeipa/ticket/678
---
 install/tools/ipa-dns-install |9 -
 install/tools/ipa-replica-install |   14 +-
 install/tools/ipa-server-install  |   14 --
 ipaserver/install/bindinstance.py |8 +++-
 4 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install
index d4cd1eb..1e1dde5 100755
--- a/install/tools/ipa-dns-install
+++ b/install/tools/ipa-dns-install
@@ -40,6 +40,9 @@ def parse_options():
   help="Add a DNS forwarder")
 parser.add_option("--no-forwarders", dest="no_forwarders", action="store_true",
   default=False, help="Do not add any DNS forwarders, use root servers instead")
+parser.add_option("--no-reverse", dest="no_reverse",
+  action="store_true", default=False,
+  help="Do not create reverse DNS zone")
 parser.add_option("--zonemgr", dest="zonemgr", 
   help="DNS zone manager e-mail address. Defaults to root")
 parser.add_option("-U", "--unattended", dest="unattended", action="store_true",
@@ -164,7 +167,11 @@ def main():
 
 # Create a BIND instance
 bind = bindinstance.BindInstance(fstore, dm_password)
-create_reverse = bindinstance.create_reverse(options.unattended)
+create_reverse = True
+if options.unattended:
+create_reverse = not options.no_reverse
+elif not options.no_reverse:
+create_reverse = bindinstance.create_reverse()
 bind.setup(api.env.host, ip_address, api.env.realm, api.env.domain, dns_forwarders, conf_ntp, create_reverse, zonemgr=options.zonemgr)
 api.Backend.ldap2.connect(bind_dn="cn=Directory Manager", bind_pw=dm_password)
 bind.create_instance()
diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index 9dda13f..2acc84e 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -66,6 +66,8 @@ def parse_options():
   help="Add a DNS forwarder")
 parser.add_option("--no-forwarders", dest="no_forwarders", action="store_true",
   default=False, help="Do not add any DNS forwarders, use root servers instead")
+parser.add_option("--no-reverse", dest="no_reverse", action="store_true",
+  default=False, help="Do not create reverse DNS zone")
 parser.add_option("--no-host-dns", dest="no_host_dns", action="store_true",
   default=False,
   help="Do not use DNS for hostname lookup during installation")
@@ -83,6 +85,8 @@ def parse_options():
 parser.error("You cannot specify a --forwarder option without the --setup-dns option")
 if options.no_forwarders:
 parser.error("You cannot specify a --no-forwarders option without the --setup-dns option")
+if options.no_reverse:
+parser.error("You cannot specify a --no-reverse option without the --setup-dns option")
 elif options.forwarders and options.no_forwarders:
 parser.error("You cannot specify a --forwarder option together with --no-forwarders")
 elif not options.forwarders and not options.no_forwarders:
@@ -247,7 +251,15 @@ def install_bind(config, options):
 ip_address = resolve_host(config.

Re: [Freeipa-devel] [PATCH] 033 Add new installer option for reverse zone creation

2011-01-06 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/05/2011 05:52 PM, Dmitri Pal wrote:
> Jan Zelený wrote:
>> Jakub Hrozek  wrote:
>>   
>>> On 01/05/2011 01:09 PM, Jan Zelený wrote:
>>> 
 Jakub Hrozek  wrote:
   
> ticket #678
> 
 Nack, the unattended option given to the create_reverse function is
 redundant, please remove it.

 Jan
   
>>> OK, new patch attached.
>>> 
>>
>> ack
>>
>>   
> Jenny had some questions about the default value. Please hold off
> pushing before you reconcile with her.
> 
> 

Based on recent discussion, I am withdrawing this patch and will prepare
a new one that will set up DNS by default, introduce a new option
- --no-dns instead and also introduce --uninstall to ipa-dns-install.

Jakub
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk0l/IgACgkQHsardTLnvCUqSwCgyplUxrEcokgFzzDQS4zVhh8x
zIoAn0YTNxO4DS/Mcd9PALDWnpVpcDZB
=k3e/
-END PGP SIGNATURE-

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


Re: [Freeipa-devel] [PATCH] 033 Add new installer option for reverse zone creation

2011-01-05 Thread Dmitri Pal
Jan Zelený wrote:
> Jakub Hrozek  wrote:
>   
>> On 01/05/2011 01:09 PM, Jan Zelený wrote:
>> 
>>> Jakub Hrozek  wrote:
>>>   
 ticket #678
 
>>> Nack, the unattended option given to the create_reverse function is
>>> redundant, please remove it.
>>>
>>> Jan
>>>   
>> OK, new patch attached.
>> 
>
> ack
>
>   
Jenny had some questions about the default value. Please hold off
pushing before you reconcile with her.



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


-- 
Thank you,
Dmitri Pal

Sr. Engineering Manager IPA project,
Red Hat Inc.


---
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/

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


Re: [Freeipa-devel] [PATCH] 033 Add new installer option for reverse zone creation

2011-01-05 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/05/2011 01:09 PM, Jan Zelený wrote:
> Jakub Hrozek  wrote:
>> ticket #678
> 
> Nack, the unattended option given to the create_reverse function is 
> redundant, 
> please remove it.
> 
> Jan
> 

OK, new patch attached.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk0kZl0ACgkQHsardTLnvCWjbwCePhwqcQ0opDRodSbzJuz9jMOg
/swAnjfjPSwC+tOTzjl8E/kxjovUzMFE
=az5d
-END PGP SIGNATURE-
From 6c152e4e72949c95bcc9b674cceaa98de07675fb Mon Sep 17 00:00:00 2001
From: Jakub Hrozek 
Date: Tue, 4 Jan 2011 08:55:47 -0500
Subject: [PATCH] A new option to specify reverse zone creation for unattended installs

https://fedorahosted.org/freeipa/ticket/678
---
 install/tools/ipa-dns-install |8 +++-
 install/tools/ipa-replica-install |   11 ++-
 install/tools/ipa-server-install  |   10 +-
 ipaserver/install/bindinstance.py |4 +---
 4 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install
index d4cd1eb..20a7354 100755
--- a/install/tools/ipa-dns-install
+++ b/install/tools/ipa-dns-install
@@ -40,6 +40,9 @@ def parse_options():
   help="Add a DNS forwarder")
 parser.add_option("--no-forwarders", dest="no_forwarders", action="store_true",
   default=False, help="Do not add any DNS forwarders, use root servers instead")
+parser.add_option("--create-reverse", dest="create_reverse",
+  action="store_true", default=False,
+  help="Create reverse DNS zone")
 parser.add_option("--zonemgr", dest="zonemgr", 
   help="DNS zone manager e-mail address. Defaults to root")
 parser.add_option("-U", "--unattended", dest="unattended", action="store_true",
@@ -164,7 +167,10 @@ def main():
 
 # Create a BIND instance
 bind = bindinstance.BindInstance(fstore, dm_password)
-create_reverse = bindinstance.create_reverse(options.unattended)
+if options.unattended:
+create_reverse = options.create_reverse
+elif not options.create_reverse:
+create_reverse = bindinstance.create_reverse()
 bind.setup(api.env.host, ip_address, api.env.realm, api.env.domain, dns_forwarders, conf_ntp, create_reverse, zonemgr=options.zonemgr)
 api.Backend.ldap2.connect(bind_dn="cn=Directory Manager", bind_pw=dm_password)
 bind.create_instance()
diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index 9dda13f..97223ea 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -66,6 +66,8 @@ def parse_options():
   help="Add a DNS forwarder")
 parser.add_option("--no-forwarders", dest="no_forwarders", action="store_true",
   default=False, help="Do not add any DNS forwarders, use root servers instead")
+parser.add_option("--create-reverse", dest="create_reverse", action="store_true",
+  default=False, help="Create reverse DNS zone")
 parser.add_option("--no-host-dns", dest="no_host_dns", action="store_true",
   default=False,
   help="Do not use DNS for hostname lookup during installation")
@@ -83,6 +85,8 @@ def parse_options():
 parser.error("You cannot specify a --forwarder option without the --setup-dns option")
 if options.no_forwarders:
 parser.error("You cannot specify a --no-forwarders option without the --setup-dns option")
+if options.create_reverse:
+parser.error("You cannot specify a --create-reverse option without the --setup-dns option")
 elif options.forwarders and options.no_forwarders:
 parser.error("You cannot specify a --forwarder option together with --no-forwarders")
 elif not options.forwarders and not options.no_forwarders:
@@ -247,7 +251,12 @@ def install_bind(config, options):
 ip_address = resolve_host(config.host_name)
 if not ip_address:
 sys.exit("Unable to resolve IP address for host name")
-create_reverse = bindinstance.create_reverse(options.unattended)
+
+if options.unattended:
+create_reverse = options.create_reverse
+elif not options.create_reverse:
+create_reverse = bindinstance.create_reverse()
+
 bind.setup(config.host_name, ip_address, config.realm_name,
config.domain_name, forwarders, options.conf_ntp, create_reverse)
 bind.create_instance()
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index 2bbf481..3ff82ec 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -99,6 +99,8 @@ def parse_options():
   help="Add a DNS forwarder")
 parser.add_option("--no-forwarders", dest="no_forwarders", action="store_true",
   default=F