summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipaserver
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2008-05-05 14:03:51 -0400
committerSimo Sorce <ssorce@redhat.com>2008-05-08 17:03:43 -0400
commit34c6ac06c667c71840b4545db23ffbbb0f4cd9e3 (patch)
tree714e37bc54ad547f57f21d4ae9c0748a5d4fbd16 /ipa-server/ipaserver
parent6538c150b18528e0df9f90da6c65e3a6d533a826 (diff)
downloadfreeipa-34c6ac06c667c71840b4545db23ffbbb0f4cd9e3.tar.gz
freeipa-34c6ac06c667c71840b4545db23ffbbb0f4cd9e3.tar.xz
freeipa-34c6ac06c667c71840b4545db23ffbbb0f4cd9e3.zip
Return better ewrror message that gives a hint about who actually returned it
+ Some cleanups (trainling spaces and such).
Diffstat (limited to 'ipa-server/ipaserver')
-rw-r--r--ipa-server/ipaserver/replication.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/ipa-server/ipaserver/replication.py b/ipa-server/ipaserver/replication.py
index b9e4e6cb3..d8bb60066 100644
--- a/ipa-server/ipaserver/replication.py
+++ b/ipa-server/ipaserver/replication.py
@@ -91,7 +91,6 @@ class ReplicationManager:
def replica_dn(self):
return 'cn=replica, cn="%s", cn=mapping tree, cn=config' % self.suffix
-
def local_replica_config(self, conn, replica_id):
dn = self.replica_dn()
@@ -196,19 +195,17 @@ class ReplicationManager:
self.conn.modify_s(dn, mod)
except ldap.TYPE_OR_VALUE_EXISTS:
logging.debug("chainOnUpdate already enabled for %s" % self.suffix)
-
-
+
def setup_chain_on_update(self, other_conn):
chainbe = self.setup_chaining_backend(other_conn)
self.enable_chain_on_update(chainbe)
-
+
def agreement_dn(self, conn):
cn = "meTo%s%d" % (conn.host, PORT)
dn = "cn=%s, %s" % (cn, self.replica_dn())
return (cn, dn)
-
def setup_agreement(self, a, b):
cn, dn = self.agreement_dn(b)
@@ -259,7 +256,7 @@ class ReplicationManager:
if not status:
print "No status yet"
elif status.find("replica busy") > -1:
- print "Update failed - replica busy - status", status
+ print "[%s] reports: Replica Busy! Status: [%s]" % (conn.host, status)
done = True
hasError = 2
elif status.find("Total update succeeded") > -1:
@@ -268,7 +265,7 @@ class ReplicationManager:
elif inprogress.lower() == 'true':
print "Update in progress yet not in progress"
else:
- print "Update failed: status", status
+ print "[%s] reports: Update failed! Status: [%s]" % (conn.host, status)
hasError = 1
done = True
else:
@@ -292,7 +289,7 @@ class ReplicationManager:
other_conn.modify_s(dn, mod)
return self.wait_for_repl_init(other_conn, dn)
-
+
def basic_replication_setup(self, conn, replica_id):
self.add_replication_manager(conn)
self.local_replica_config(conn, replica_id)
@@ -319,7 +316,7 @@ class ReplicationManager:
self.setup_agreement(other_conn, self.conn)
self.setup_agreement(self.conn, other_conn)
-
+
return self.start_replication(other_conn)
def initialize_replication(self, dn, conn):