Re: [Freeipa-devel] [PATCH 0075-0076] Fix installer regression
On 18.12.2015 15:13, Jan Cholasta wrote: On 18.12.2015 14:11, David Kupka wrote: On 18/12/15 13:57, David Kupka wrote: On 17/12/15 13:44, Jan Cholasta wrote: On 17.12.2015 13:26, David Kupka wrote: On 17/12/15 12:14, Petr Vobornik wrote: On 12/16/2015 02:31 PM, David Kupka wrote: https://www.redhat.com/archives/freeipa-users/2015-December/msg00203.html please link the patch to https://fedorahosted.org/freeipa/ticket/5556 Updated patches attached. NACK, this is the correct procedure for the __getattr__(), sorry for confusing you earlier: def __getattr__(self, name): for owner_cls, knob_name in self.knobs(): if knob_name == name: break else: raise AttributeError(name) for component in self.__components: if isinstance(component, owner_cls): break else: raise AttributeError(name) return getattr(component, name) Honza Updated patches attached. Completing the update. Thanks, ACK. Not pushed yet because ipa-4-3 is cursed. Honza Pushed to master: f0703d3c2a399012fa4cae0b856c08ff18b42463 ipa-4-3: 2b3a0a4519b409c4c363afcb61da77ad9b9a1436 ipa-4-2: d655b949d3bd8f5d192605acd579314e82492b86 -- 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
Re: [Freeipa-devel] [PATCH 0075-0076] Fix installer regression
On 18.12.2015 14:11, David Kupka wrote: On 18/12/15 13:57, David Kupka wrote: On 17/12/15 13:44, Jan Cholasta wrote: On 17.12.2015 13:26, David Kupka wrote: On 17/12/15 12:14, Petr Vobornik wrote: On 12/16/2015 02:31 PM, David Kupka wrote: https://www.redhat.com/archives/freeipa-users/2015-December/msg00203.html please link the patch to https://fedorahosted.org/freeipa/ticket/5556 Updated patches attached. NACK, this is the correct procedure for the __getattr__(), sorry for confusing you earlier: def __getattr__(self, name): for owner_cls, knob_name in self.knobs(): if knob_name == name: break else: raise AttributeError(name) for component in self.__components: if isinstance(component, owner_cls): break else: raise AttributeError(name) return getattr(component, name) Honza Updated patches attached. Completing the update. Thanks, ACK. Not pushed yet because ipa-4-3 is cursed. Honza -- Jan Cholasta -- 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
Re: [Freeipa-devel] [PATCH 0075-0076] Fix installer regression
On 18/12/15 13:57, David Kupka wrote: On 17/12/15 13:44, Jan Cholasta wrote: On 17.12.2015 13:26, David Kupka wrote: On 17/12/15 12:14, Petr Vobornik wrote: On 12/16/2015 02:31 PM, David Kupka wrote: https://www.redhat.com/archives/freeipa-users/2015-December/msg00203.html please link the patch to https://fedorahosted.org/freeipa/ticket/5556 Updated patches attached. NACK, this is the correct procedure for the __getattr__(), sorry for confusing you earlier: def __getattr__(self, name): for owner_cls, knob_name in self.knobs(): if knob_name == name: break else: raise AttributeError(name) for component in self.__components: if isinstance(component, owner_cls): break else: raise AttributeError(name) return getattr(component, name) Honza Updated patches attached. Completing the update. -- David Kupka From f0c07859e5aaf5283418122ba0d492807d8ab92a Mon Sep 17 00:00:00 2001 From: David Kupka Date: Wed, 16 Dec 2015 12:43:13 + Subject: [PATCH] installer: Propagate option values from components instead of copying them. https://fedorahosted.org/freeipa/ticket/5556 --- ipapython/install/core.py | 21 ++--- ipaserver/install/server/common.py | 28 2 files changed, 18 insertions(+), 31 deletions(-) diff --git a/ipapython/install/core.py b/ipapython/install/core.py index 6b2da05d31d26bd3b7222e237c8646fa80ab5290..06acca6782f556b5880e7f6d023ab222f1025062 100644 --- a/ipapython/install/core.py +++ b/ipapython/install/core.py @@ -528,6 +528,21 @@ class Composite(Configurable): for order, owner_cls, name in result: yield owner_cls, name +def __getattr__(self, name): +for owner_cls, knob_name in self.knobs(): +if knob_name == name: +break +else: +raise AttributeError(name) + +for component in self.__components: +if isinstance(component, owner_cls): +break +else: +raise AttributeError(name) + +return getattr(component, name) + def _reset(self): self.__components = list(self._get_components()) @@ -545,8 +560,7 @@ class Composite(Configurable): try: validator.next() except StopIteration: -if child.done(): -self.__components.remove(child) +pass else: new_validate.append((child, validator)) if not new_validate: @@ -560,7 +574,8 @@ class Composite(Configurable): yield from_(super(Composite, self)._configure()) -execute = [(c, c._executor()) for c in self.__components] +execute = [(c, c._executor()) for c in self.__components +if not c.done()] while True: new_execute = [] for child, executor in execute: diff --git a/ipaserver/install/server/common.py b/ipaserver/install/server/common.py index 3eb7279d200ffd6ab33d8d914c8d4f13e567a171..948aac842951dc3cef9dace87b28a92d3f98dea3 100644 --- a/ipaserver/install/server/common.py +++ b/ipaserver/install/server/common.py @@ -409,34 +409,6 @@ class BaseServer(common.Installable, common.Interactive, core.Composite): # Automatically disable pkinit w/ dogtag until that is supported self.no_pkinit = True -self.external_ca = self.ca.external_ca -self.external_ca_type = self.ca.external_ca_type -self.external_cert_files = self.ca.external_cert_files -self.dirsrv_cert_files = self.ca.dirsrv_cert_files -self.http_cert_files = self.ca.http_cert_files -self.pkinit_cert_files = self.ca.pkinit_cert_files -self.dirsrv_pin = self.ca.dirsrv_pin -self.http_pin = self.ca.http_pin -self.pkinit_pin = self.ca.pkinit_pin -self.dirsrv_cert_name = self.ca.dirsrv_cert_name -self.http_cert_name = self.ca.http_cert_name -self.pkinit_cert_name = self.ca.pkinit_cert_name -self.ca_cert_files = self.ca.ca_cert_files -self.subject = self.ca.subject -self.ca_signing_algorithm = self.ca.ca_signing_algorithm -self.skip_schema_check = self.ca.skip_schema_check - -self.forwarders = self.dns.forwarders -self.no_forwarders = self.dns.no_forwarders -self.reverse_zones = self.dns.reverse_zones -self.no_reverse = self.dns.no_reverse -self.no_dnssec_validation = self.dns.no_dnssec_validation -self.dnssec_master = self.dns.dnssec_master -self.disable_dnssec_master = self.dns.disable_dnssec_master -self.kasp_db_file = self.dns.kasp_db_file -self.force = self.dns.force -self.zonemgr = self.dns.zonemgr - self.unattended = not self.interactive ca = core.Component(BaseServe
Re: [Freeipa-devel] [PATCH 0075-0076] Fix installer regression
On 17/12/15 13:44, Jan Cholasta wrote: On 17.12.2015 13:26, David Kupka wrote: On 17/12/15 12:14, Petr Vobornik wrote: On 12/16/2015 02:31 PM, David Kupka wrote: https://www.redhat.com/archives/freeipa-users/2015-December/msg00203.html please link the patch to https://fedorahosted.org/freeipa/ticket/5556 Updated patches attached. NACK, this is the correct procedure for the __getattr__(), sorry for confusing you earlier: def __getattr__(self, name): for owner_cls, knob_name in self.knobs(): if knob_name == name: break else: raise AttributeError(name) for component in self.__components: if isinstance(component, owner_cls): break else: raise AttributeError(name) return getattr(component, name) Honza Updated patches attached. -- David Kupka From 2f4a8a968c6d25c60aeff46ed137f736726c0225 Mon Sep 17 00:00:00 2001 From: David Kupka Date: Wed, 16 Dec 2015 12:43:13 + Subject: [PATCH 1/2] installer: Propagate option values from components instead of copying them. https://fedorahosted.org/freeipa/ticket/5556 --- ipapython/install/core.py | 13 ++--- ipaserver/install/server/common.py | 28 2 files changed, 10 insertions(+), 31 deletions(-) diff --git a/ipapython/install/core.py b/ipapython/install/core.py index 6b2da05d31d26bd3b7222e237c8646fa80ab5290..8520aaf097e7851a364e616d8843df9338cae8ad 100644 --- a/ipapython/install/core.py +++ b/ipapython/install/core.py @@ -528,6 +528,13 @@ class Composite(Configurable): for order, owner_cls, name in result: yield owner_cls, name +def __getattr__(self, name): +for owner_cls, knob_name in self.knobs(): +for component in self.__components: +if isinstance(component, owner_cls): +return getattr(component, knob_name) +raise AttributeError(name) + def _reset(self): self.__components = list(self._get_components()) @@ -545,8 +552,7 @@ class Composite(Configurable): try: validator.next() except StopIteration: -if child.done(): -self.__components.remove(child) +pass else: new_validate.append((child, validator)) if not new_validate: @@ -560,7 +566,8 @@ class Composite(Configurable): yield from_(super(Composite, self)._configure()) -execute = [(c, c._executor()) for c in self.__components] +execute = [(c, c._executor()) for c in self.__components +if not c.done()] while True: new_execute = [] for child, executor in execute: diff --git a/ipaserver/install/server/common.py b/ipaserver/install/server/common.py index 3eb7279d200ffd6ab33d8d914c8d4f13e567a171..948aac842951dc3cef9dace87b28a92d3f98dea3 100644 --- a/ipaserver/install/server/common.py +++ b/ipaserver/install/server/common.py @@ -409,34 +409,6 @@ class BaseServer(common.Installable, common.Interactive, core.Composite): # Automatically disable pkinit w/ dogtag until that is supported self.no_pkinit = True -self.external_ca = self.ca.external_ca -self.external_ca_type = self.ca.external_ca_type -self.external_cert_files = self.ca.external_cert_files -self.dirsrv_cert_files = self.ca.dirsrv_cert_files -self.http_cert_files = self.ca.http_cert_files -self.pkinit_cert_files = self.ca.pkinit_cert_files -self.dirsrv_pin = self.ca.dirsrv_pin -self.http_pin = self.ca.http_pin -self.pkinit_pin = self.ca.pkinit_pin -self.dirsrv_cert_name = self.ca.dirsrv_cert_name -self.http_cert_name = self.ca.http_cert_name -self.pkinit_cert_name = self.ca.pkinit_cert_name -self.ca_cert_files = self.ca.ca_cert_files -self.subject = self.ca.subject -self.ca_signing_algorithm = self.ca.ca_signing_algorithm -self.skip_schema_check = self.ca.skip_schema_check - -self.forwarders = self.dns.forwarders -self.no_forwarders = self.dns.no_forwarders -self.reverse_zones = self.dns.reverse_zones -self.no_reverse = self.dns.no_reverse -self.no_dnssec_validation = self.dns.no_dnssec_validation -self.dnssec_master = self.dns.dnssec_master -self.disable_dnssec_master = self.dns.disable_dnssec_master -self.kasp_db_file = self.dns.kasp_db_file -self.force = self.dns.force -self.zonemgr = self.dns.zonemgr - self.unattended = not self.interactive ca = core.Component(BaseServerCA) -- 2.5.0 From cae86eb374c2342c8714b5917422a783d54fef34 Mon Sep 17 00:00:00 2001 From: David Kupka Date: Wed, 16 Dec 2015 12:43:13 + Subject: [PATCH 1/2] installer: Propagate option values fro
Re: [Freeipa-devel] [PATCH 0075-0076] Fix installer regression
On 17.12.2015 13:26, David Kupka wrote: On 17/12/15 12:14, Petr Vobornik wrote: On 12/16/2015 02:31 PM, David Kupka wrote: https://www.redhat.com/archives/freeipa-users/2015-December/msg00203.html please link the patch to https://fedorahosted.org/freeipa/ticket/5556 Updated patches attached. NACK, this is the correct procedure for the __getattr__(), sorry for confusing you earlier: def __getattr__(self, name): for owner_cls, knob_name in self.knobs(): if knob_name == name: break else: raise AttributeError(name) for component in self.__components: if isinstance(component, owner_cls): break else: raise AttributeError(name) return getattr(component, name) Honza -- Jan Cholasta -- 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
Re: [Freeipa-devel] [PATCH 0075-0076] Fix installer regression
On 17/12/15 12:14, Petr Vobornik wrote: On 12/16/2015 02:31 PM, David Kupka wrote: https://www.redhat.com/archives/freeipa-users/2015-December/msg00203.html please link the patch to https://fedorahosted.org/freeipa/ticket/5556 Updated patches attached. -- David Kupka From 9920cae3e7938f3d5c8d65ab2794b87a7c6e6e89 Mon Sep 17 00:00:00 2001 From: David Kupka Date: Wed, 16 Dec 2015 12:43:13 + Subject: [PATCH 1/2] installer: Propagate option values from components instead of copying them. https://fedorahosted.org/freeipa/ticket/5556 --- ipapython/install/core.py | 7 +++ ipaserver/install/server/common.py | 28 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/ipapython/install/core.py b/ipapython/install/core.py index 6b2da05d31d26bd3b7222e237c8646fa80ab5290..62756da39c012bda4f7b77e5d0b2716c67ec013b 100644 --- a/ipapython/install/core.py +++ b/ipapython/install/core.py @@ -528,6 +528,13 @@ class Composite(Configurable): for order, owner_cls, name in result: yield owner_cls, name +def __getattr__(self, name): +for owner_cls, knob_name in self.knobs(): +for component in self.__components: +if isinstance(component, owner_cls): +return getattr(component, knob_name) +raise AttributeError(name) + def _reset(self): self.__components = list(self._get_components()) diff --git a/ipaserver/install/server/common.py b/ipaserver/install/server/common.py index 3eb7279d200ffd6ab33d8d914c8d4f13e567a171..948aac842951dc3cef9dace87b28a92d3f98dea3 100644 --- a/ipaserver/install/server/common.py +++ b/ipaserver/install/server/common.py @@ -409,34 +409,6 @@ class BaseServer(common.Installable, common.Interactive, core.Composite): # Automatically disable pkinit w/ dogtag until that is supported self.no_pkinit = True -self.external_ca = self.ca.external_ca -self.external_ca_type = self.ca.external_ca_type -self.external_cert_files = self.ca.external_cert_files -self.dirsrv_cert_files = self.ca.dirsrv_cert_files -self.http_cert_files = self.ca.http_cert_files -self.pkinit_cert_files = self.ca.pkinit_cert_files -self.dirsrv_pin = self.ca.dirsrv_pin -self.http_pin = self.ca.http_pin -self.pkinit_pin = self.ca.pkinit_pin -self.dirsrv_cert_name = self.ca.dirsrv_cert_name -self.http_cert_name = self.ca.http_cert_name -self.pkinit_cert_name = self.ca.pkinit_cert_name -self.ca_cert_files = self.ca.ca_cert_files -self.subject = self.ca.subject -self.ca_signing_algorithm = self.ca.ca_signing_algorithm -self.skip_schema_check = self.ca.skip_schema_check - -self.forwarders = self.dns.forwarders -self.no_forwarders = self.dns.no_forwarders -self.reverse_zones = self.dns.reverse_zones -self.no_reverse = self.dns.no_reverse -self.no_dnssec_validation = self.dns.no_dnssec_validation -self.dnssec_master = self.dns.dnssec_master -self.disable_dnssec_master = self.dns.disable_dnssec_master -self.kasp_db_file = self.dns.kasp_db_file -self.force = self.dns.force -self.zonemgr = self.dns.zonemgr - self.unattended = not self.interactive ca = core.Component(BaseServerCA) -- 2.5.0 From 50300b478e3838e7f98d541277aec28c6c76d869 Mon Sep 17 00:00:00 2001 From: David Kupka Date: Wed, 16 Dec 2015 12:43:13 + Subject: [PATCH 1/2] installer: Propagate option values from components instead of copying them. https://fedorahosted.org/freeipa/ticket/5556 --- ipapython/install/core.py | 7 +++ ipaserver/install/server/common.py | 31 --- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/ipapython/install/core.py b/ipapython/install/core.py index 2f62b8568fea129255e42b404789fd29b70dca7c..3eb38d3783a7cad5d07f6dc6c669e82695e322f2 100644 --- a/ipapython/install/core.py +++ b/ipapython/install/core.py @@ -531,6 +531,13 @@ class Composite(Configurable): for order, owner_cls, name in result: yield owner_cls, name +def __getattr__(self, name): +for owner_cls, knob_name in self.knobs(): +for component in self.__components: +if isinstance(component, owner_cls): +return getattr(component, knob_name) +raise AttributeError(name) + def _reset(self): self.__components = list(self._get_components()) diff --git a/ipaserver/install/server/common.py b/ipaserver/install/server/common.py index 19a1cc8210cb652b6e00ef6eb8f0d66b214ca398..00b05c9b34abac159d6fcf9277dfe29197025334 100644 --- a/ipaserver/install/server/common.py +++ b/ipaserver/install/server/common.py @@ -461,37 +461,6 @@ class BaseServer(common.Installable, common.Interactive, core.Composite): # Automatically disable pki
Re: [Freeipa-devel] [PATCH 0075-0076] Fix installer regression
On 12/16/2015 02:31 PM, David Kupka wrote: https://www.redhat.com/archives/freeipa-users/2015-December/msg00203.html please link the patch to https://fedorahosted.org/freeipa/ticket/5556 -- Petr Vobornik -- 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
[Freeipa-devel] [PATCH 0075-0076] Fix installer regression
https://www.redhat.com/archives/freeipa-users/2015-December/msg00203.html -- David Kupka From 114b4e2c1ffaa5c09dbfed54bb1f90cfa41f4678 Mon Sep 17 00:00:00 2001 From: David Kupka Date: Wed, 16 Dec 2015 12:43:13 + Subject: [PATCH 1/2] installer: Propagate option values from components instead of copying them. --- ipapython/install/core.py | 7 +++ ipaserver/install/server/common.py | 28 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/ipapython/install/core.py b/ipapython/install/core.py index 6b2da05..62756da 100644 --- a/ipapython/install/core.py +++ b/ipapython/install/core.py @@ -528,6 +528,13 @@ class Composite(Configurable): for order, owner_cls, name in result: yield owner_cls, name +def __getattr__(self, name): +for owner_cls, knob_name in self.knobs(): +for component in self.__components: +if isinstance(component, owner_cls): +return getattr(component, knob_name) +raise AttributeError(name) + def _reset(self): self.__components = list(self._get_components()) diff --git a/ipaserver/install/server/common.py b/ipaserver/install/server/common.py index 3eb7279..948aac8 100644 --- a/ipaserver/install/server/common.py +++ b/ipaserver/install/server/common.py @@ -409,34 +409,6 @@ class BaseServer(common.Installable, common.Interactive, core.Composite): # Automatically disable pkinit w/ dogtag until that is supported self.no_pkinit = True -self.external_ca = self.ca.external_ca -self.external_ca_type = self.ca.external_ca_type -self.external_cert_files = self.ca.external_cert_files -self.dirsrv_cert_files = self.ca.dirsrv_cert_files -self.http_cert_files = self.ca.http_cert_files -self.pkinit_cert_files = self.ca.pkinit_cert_files -self.dirsrv_pin = self.ca.dirsrv_pin -self.http_pin = self.ca.http_pin -self.pkinit_pin = self.ca.pkinit_pin -self.dirsrv_cert_name = self.ca.dirsrv_cert_name -self.http_cert_name = self.ca.http_cert_name -self.pkinit_cert_name = self.ca.pkinit_cert_name -self.ca_cert_files = self.ca.ca_cert_files -self.subject = self.ca.subject -self.ca_signing_algorithm = self.ca.ca_signing_algorithm -self.skip_schema_check = self.ca.skip_schema_check - -self.forwarders = self.dns.forwarders -self.no_forwarders = self.dns.no_forwarders -self.reverse_zones = self.dns.reverse_zones -self.no_reverse = self.dns.no_reverse -self.no_dnssec_validation = self.dns.no_dnssec_validation -self.dnssec_master = self.dns.dnssec_master -self.disable_dnssec_master = self.dns.disable_dnssec_master -self.kasp_db_file = self.dns.kasp_db_file -self.force = self.dns.force -self.zonemgr = self.dns.zonemgr - self.unattended = not self.interactive ca = core.Component(BaseServerCA) -- 2.5.0 From b726b613d0f5afcbe7665368b9aaba336d6e2974 Mon Sep 17 00:00:00 2001 From: David Kupka Date: Wed, 16 Dec 2015 12:43:13 + Subject: [PATCH 1/2] installer: Propagate option values from components instead of copying them. --- ipapython/install/core.py | 7 +++ ipaserver/install/server/common.py | 31 --- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/ipapython/install/core.py b/ipapython/install/core.py index 2f62b85..3eb38d3 100644 --- a/ipapython/install/core.py +++ b/ipapython/install/core.py @@ -531,6 +531,13 @@ class Composite(Configurable): for order, owner_cls, name in result: yield owner_cls, name +def __getattr__(self, name): +for owner_cls, knob_name in self.knobs(): +for component in self.__components: +if isinstance(component, owner_cls): +return getattr(component, knob_name) +raise AttributeError(name) + def _reset(self): self.__components = list(self._get_components()) diff --git a/ipaserver/install/server/common.py b/ipaserver/install/server/common.py index 19a1cc8..00b05c9 100644 --- a/ipaserver/install/server/common.py +++ b/ipaserver/install/server/common.py @@ -461,37 +461,6 @@ class BaseServer(common.Installable, common.Interactive, core.Composite): # Automatically disable pkinit w/ dogtag until that is supported self.no_pkinit = True -self.external_ca = self.ca.external_ca -self.external_ca_type = self.ca.external_ca_type -self.external_cert_files = self.ca.external_cert_files -self.dirsrv_cert_files = self.ca.dirsrv_cert_files -self.http_cert_files = self.ca.http_cert_files -self.pkinit_cert_files = self.ca.pkinit_cert_files -self.dirsrv_pin = self.ca.dirsrv_pin -self.http_pin = self.ca.http_pin -self.pkinit_pin = self.ca.p