in_server controls how messages are dispatched. We should import on context.

This prevents the error message "session memcached servers not running" in ipa-ldap-updater and ipa-replica-manage.

rob
>From be57f22856bfe95e0bd19d8b41f19dfd83153384 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcrit...@redhat.com>
Date: Fri, 16 Mar 2012 10:26:17 -0400
Subject: [PATCH] Import the ipaserver plugins based on context, not
 env.in_server.

in_server controls how a method is dispatched, it should not also control
what plugins are imported.

This suppresses the error message "session memcached servers not running."

https://fedorahosted.org/freeipa/ticket/2499
---
 ipalib/plugable.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 4d0011029573df44d8d5e85e0e2b2a3f872c0703..293db9241d55bc664268908bc75b7f67022259de 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -596,7 +596,7 @@ class API(DictProxy):
         if self.env.mode in ('dummy', 'unit_test'):
             return
         self.import_plugins('ipalib')
-        if self.env.in_server:
+        if self.env.context in ('server', 'lite'):
             self.import_plugins('ipaserver')
         if self.env.context in ('installer', 'updates'):
             self.import_plugins('ipaserver/install/plugins')
-- 
1.7.6

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

Reply via email to