From d03619fff3a1eb7d21c2ba21f8867ae8018779b8 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 11 Jun 2015 15:45:38 -0400 Subject: Implement replica promotion functionality This patch implements a new flag --promote for the ipa-replica-install command that allows an administrative user to 'promote' an already joined client to become a full ipa server. The only credentials used are that of an administrator. This code relies on ipa-custodia being available on the peer master as well as a number of other patches to allow a computer account to request certificates for its services. Therefore this feature is marked to work only with domain level 1 and above servers. Ticket: https://fedorahosted.org/freeipa/ticket/2888 Signed-off-by: Simo Sorce Reviewed-By: Jan Cholasta --- ipapython/install/cli.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'ipapython') diff --git a/ipapython/install/cli.py b/ipapython/install/cli.py index a9efa74f3..0047eecb0 100644 --- a/ipapython/install/cli.py +++ b/ipapython/install/cli.py @@ -25,6 +25,7 @@ if six.PY3: def install_tool(configurable_class, command_name, log_file_name, positional_arguments=None, usage=None, debug_option=False, + use_private_ccache=True, uninstall_log_file_name=None, uninstall_positional_arguments=None, uninstall_usage=None): if (uninstall_log_file_name is not None or @@ -52,6 +53,7 @@ def install_tool(configurable_class, command_name, log_file_name, usage=usage, debug_option=debug_option, uninstall_kwargs=uninstall_kwargs, + use_private_ccache=use_private_ccache, ) ) @@ -76,6 +78,7 @@ class ConfigureTool(admintool.AdminTool): configurable_class = None debug_option = False positional_arguments = None + use_private_ccache = True @staticmethod def _transform(configurable_class): @@ -305,10 +308,12 @@ class ConfigureTool(admintool.AdminTool): signal.signal(signal.SIGTERM, self.__signal_handler) - # Use private ccache - with private_ccache(): + if self.use_private_ccache: + with private_ccache(): + super(ConfigureTool, self).run() + cfgr.run() + else: super(ConfigureTool, self).run() - cfgr.run() @staticmethod -- cgit