mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-13 00:42:03 -05:00
Verify that the replication plugin exists before setting up replicas.
ticket 502
This commit is contained in:
1 parent
358b28398c
commit
1600146c94
3 files changed
+20
No files matched your search
@@ -28,6 +28,7 @@ from ipapython import ipautil
|
||||
|
||||
from ipaserver.install import dsinstance, installutils, krbinstance, service
|
||||
from ipaserver.install import bindinstance, httpinstance, ntpinstance, certs
|
||||
from ipaserver.install.replication import check_replication_plugin
|
||||
from ipaserver.plugins.ldap2 import ldap2
|
||||
from ipapython import version
|
||||
from ipalib import api, errors, util
|
||||
@@ -279,6 +280,8 @@ def check_bind():
|
||||
sys.exit(1)
|
||||
|
||||
def main():
|
||||
if not check_replication_plugin():
|
||||
sys.exit(1)
|
||||
safe_options, options, filename = parse_options()
|
||||
installutils.standard_logging_setup("/var/log/ipareplica-install.log", options.debug)
|
||||
logging.debug('%s was invoked with argument "%s" and options: %s' % (sys.argv[0], filename, safe_options))
|
||||
|
||||
@@ -29,6 +29,7 @@ from optparse import OptionParser
|
||||
from ipapython import ipautil
|
||||
from ipaserver.install import bindinstance, dsinstance, installutils, certs
|
||||
from ipaserver.install.bindinstance import add_zone, add_reverze_zone, add_rr, add_ptr_rr
|
||||
from ipaserver.install.replication import check_replication_plugin
|
||||
from ipaserver.plugins.ldap2 import ldap2
|
||||
from ipapython import version
|
||||
from ipalib import api, errors, util
|
||||
@@ -228,6 +229,8 @@ def get_dirman_password():
|
||||
return installutils.read_password("Directory Manager (existing master)", confirm=False, validate=False)
|
||||
|
||||
def main():
|
||||
if not check_replication_plugin():
|
||||
sys.exit(1)
|
||||
options, args = parse_options()
|
||||
|
||||
replica_fqdn = args[0]
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
import time, logging
|
||||
|
||||
import os
|
||||
import ldap
|
||||
from ipaserver import ipaldap
|
||||
from ldap import modlist
|
||||
@@ -39,6 +40,19 @@ WINSYNC = 2
|
||||
|
||||
SASL_AUTH = ldap.sasl.sasl({}, 'GSSAPI')
|
||||
|
||||
def check_replication_plugin():
|
||||
"""
|
||||
Confirm that the 389-ds replication is installed.
|
||||
|
||||
Emit a message and return True/False
|
||||
"""
|
||||
if not os.path.exists('/usr/lib/dirsrv/plugins/libreplication-plugin.so') and \
|
||||
not os.path.exists('/usr/lib64/dirsrv/plugins/libreplication-plugin.so'):
|
||||
print "The 389-ds replication plug-in was not found on this system"
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
class ReplicationManager:
|
||||
"""Manage replication agreements between DS servers, and sync
|
||||
agreements with Windows servers"""
|
||||
|
||||
Reference in new issue
Block a user