diff options
author | Martin Kosek <mkosek@redhat.com> | 2012-08-13 09:38:24 +0200 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-08-12 23:26:16 -0400 |
commit | 6341eff07891dfd4ed253081eb056ff6eb5aa573 (patch) | |
tree | e11d50cfa179389dc05b1405653e5afe581b0cc3 /ipaserver/install/dsinstance.py | |
parent | 94d457e83c172320707fbf13f7a1587dad128ece (diff) | |
download | freeipa-6341eff07891dfd4ed253081eb056ff6eb5aa573.tar.gz freeipa-6341eff07891dfd4ed253081eb056ff6eb5aa573.tar.xz freeipa-6341eff07891dfd4ed253081eb056ff6eb5aa573.zip |
Fix winsync agreements creation
Due to recent addition of ID range support to DsInstance, the class
could no longer be instantiated when realm_name was passed but
ID range parameters were not. This condition broke winsync agreements
creation in ipa-replica-manage.
Make sure that ID range computation in DsInstance does not crash in
this cases so that winsync replica can be created. Also convert --binddn
option of ipa-replica-manage script to IPA native DN type so that
setup_agreement does not crash.
https://fedorahosted.org/freeipa/ticket/2987
Diffstat (limited to 'ipaserver/install/dsinstance.py')
-rw-r--r-- | ipaserver/install/dsinstance.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py index bf6677381..5e6aa0512 100644 --- a/ipaserver/install/dsinstance.py +++ b/ipaserver/install/dsinstance.py @@ -313,6 +313,10 @@ class DsInstance(service.Service): def __setup_sub_dict(self): server_root = find_server_root() + try: + idrange_size = self.idmax - self.idstart + 1 + except TypeError: + idrange_size = None self.sub_dict = dict(FQDN=self.fqdn, SERVERID=self.serverid, PASSWORD=self.dm_password, RANDOM_PASSWORD=self.generate_random(), @@ -323,7 +327,7 @@ class DsInstance(service.Service): IDMAX=self.idmax, HOST=self.fqdn, ESCAPED_SUFFIX=str(self.suffix), GROUP=DS_GROUP, - IDRANGE_SIZE=self.idmax-self.idstart+1 + IDRANGE_SIZE=idrange_size ) def __create_ds_user(self): |