diff options
| author | Martin Basti <mbasti@redhat.com> | 2015-03-17 17:56:34 +0100 |
|---|---|---|
| committer | Petr Vobornik <pvoborni@redhat.com> | 2015-04-14 19:25:47 +0200 |
| commit | cc19b5a76a37d1fb87deb45d9cbfc71472a99fa4 (patch) | |
| tree | 1dbecc1e9cb5b4bf972996fc45a2738f9942863d /ipaserver/install/plugins/updateclient.py | |
| parent | b4ca5c57d230c80ecc4f8eaaa01d8e7a36bcb3b4 (diff) | |
| download | freeipa-cc19b5a76a37d1fb87deb45d9cbfc71472a99fa4.tar.gz freeipa-cc19b5a76a37d1fb87deb45d9cbfc71472a99fa4.tar.xz freeipa-cc19b5a76a37d1fb87deb45d9cbfc71472a99fa4.zip | |
Server Upgrade: Apply plugin updates immediately
Preparation to moving plugins executin into update files.
* remove apply_now flag
* plugins will return only (restart, modifications)
https://fedorahosted.org/freeipa/ticket/4904
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/install/plugins/updateclient.py')
| -rw-r--r-- | ipaserver/install/plugins/updateclient.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/ipaserver/install/plugins/updateclient.py b/ipaserver/install/plugins/updateclient.py index 745171dd0..782ad0eda 100644 --- a/ipaserver/install/plugins/updateclient.py +++ b/ipaserver/install/plugins/updateclient.py @@ -32,13 +32,9 @@ class updateclient(backend.Executioner): An update plugin can be executed before the file-based plugins or afterward. Each plugin returns three values: - 1. restart: dirsrv needs to be restarted BEFORE this update is + 1. restart: dirsrv will be restarted AFTER this update is applied. - 2. apply_now: when True the update is applied when the plugin - returns. Otherwise the update is cached until all - plugins of that update type are complete, then they - are applied together. - 3. updates: A list of updates to be applied. + 2. updates: A list of updates to be applied. The value of an update is a dictionary with the following possible values: @@ -120,18 +116,15 @@ class updateclient(backend.Executioner): result = [] ld = LDAPUpdate(dm_password=dm_password, sub_dict={}, ldapi=ldapi) for update in self.order(updatetype): - (restart, apply_now, res) = self.run(update.name, **kw) + restart, res = self.run(update.name, **kw) + + ld.update_from_dict(res) if restart: # connection has to be closed before restart, otherwise # ld instance will try to reuse old non-valid connection ld.close_connection() self.restart(dm_password) - if apply_now: - ld.update_from_dict(res) - elif res: - result.extend(res) - self.destroy_context() return result |
