summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/server
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2016-11-18 15:42:23 +0100
committerMartin Basti <mbasti@redhat.com>2016-11-24 16:30:32 +0100
commit6409abf1a60f3548203e6607a2b157ff72af2c89 (patch)
tree2d1c06b3fc85d91f9d4bea67162a1ab9dcdca07e /ipaserver/install/server
parent2cbaf156045769b54150e4d4c3c1071f164a16fb (diff)
downloadfreeipa-6409abf1a60f3548203e6607a2b157ff72af2c89.tar.gz
freeipa-6409abf1a60f3548203e6607a2b157ff72af2c89.tar.xz
freeipa-6409abf1a60f3548203e6607a2b157ff72af2c89.zip
Break ipaplatform / ipalib import cycle of hell
Here is an attempt to break the import cycle of hell between ipaplatform and ipalib. All services now pass an ipalib.api object to services.service(). RedHatServices.__init__() still needs to do a local import because it initializes its wellknown service dict with service instances. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipaserver/install/server')
-rw-r--r--ipaserver/install/server/replicainstall.py2
-rw-r--r--ipaserver/install/server/upgrade.py10
2 files changed, 6 insertions, 6 deletions
diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py
index ee1147d3c..1889bb084 100644
--- a/ipaserver/install/server/replicainstall.py
+++ b/ipaserver/install/server/replicainstall.py
@@ -451,7 +451,7 @@ def promote_sssd(host_name):
sssdconfig.save_domain(domain)
sssdconfig.write()
- sssd = services.service('sssd')
+ sssd = services.service('sssd', api)
try:
sssd.restart()
except CalledProcessError:
diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py
index 64810fbbf..ea38f7067 100644
--- a/ipaserver/install/server/upgrade.py
+++ b/ipaserver/install/server/upgrade.py
@@ -1229,21 +1229,21 @@ def uninstall_dogtag_9(ds, http):
dsdb.untrack_server_cert("Server-Cert")
try:
- services.service('pki-cad').disable('pki-ca')
+ services.service('pki-cad', api).disable('pki-ca')
except Exception as e:
root_logger.warning("Failed to disable pki-cad: %s", e)
try:
- services.service('pki-cad').stop('pki-ca')
+ services.service('pki-cad', api).stop('pki-ca')
except Exception as e:
root_logger.warning("Failed to stop pki-cad: %s", e)
if serverid is not None:
try:
- services.service('dirsrv').disable(serverid)
+ services.service('dirsrv', api).disable(serverid)
except Exception as e:
root_logger.warning("Failed to disable dirsrv: %s", e)
try:
- services.service('dirsrv').stop(serverid)
+ services.service('dirsrv', api).stop(serverid)
except Exception as e:
root_logger.warning("Failed to stop dirsrv: %s", e)
@@ -1260,7 +1260,7 @@ def mask_named_regular():
if bindinstance.named_conf_exists():
root_logger.info('[Masking named]')
- named = services.service('named-regular')
+ named = services.service('named-regular', api)
try:
named.stop()
except Exception as e: