mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Server Upgrade: order update files by default
https://fedorahosted.org/freeipa/ticket/4904 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
parent
0c7274ead8
commit
a42fcfc18b
@ -509,7 +509,7 @@ class DsInstance(service.Service):
|
||||
def apply_updates(self):
|
||||
ld = ldapupdate.LDAPUpdate(dm_password=self.dm_password, sub_dict=self.sub_dict, plugins=True)
|
||||
files = ld.get_all_files(ldapupdate.UPDATES_DIR)
|
||||
ld.update(files, ordered=True)
|
||||
ld.update(files)
|
||||
|
||||
def __add_referint_module(self):
|
||||
self._ldap_mod("referint-conf.ldif")
|
||||
|
@ -208,7 +208,7 @@ class LDAPUpdater_NonUpgrade(LDAPUpdater):
|
||||
if not self.files:
|
||||
self.files = ld.get_all_files(UPDATES_DIR)
|
||||
|
||||
modified = ld.update(self.files, ordered=True) or modified
|
||||
modified = ld.update(self.files) or modified
|
||||
|
||||
if modified and options.test:
|
||||
self.log.info('Update complete, changes to be made, test mode')
|
||||
|
@ -745,7 +745,7 @@ class LDAPUpdate:
|
||||
for update in all_updates:
|
||||
self._delete_record(update)
|
||||
|
||||
def update(self, files, ordered=False):
|
||||
def update(self, files, ordered=True):
|
||||
"""Execute the update. files is a list of the update files to use.
|
||||
:param ordered: Update files are executed in alphabetical order
|
||||
|
||||
|
@ -131,8 +131,7 @@ class IPAUpgrade(service.Service):
|
||||
ld = ldapupdate.LDAPUpdate(dm_password='', ldapi=True, live_run=self.live_run, plugins=True)
|
||||
if len(self.files) == 0:
|
||||
self.files = ld.get_all_files(ldapupdate.UPDATES_DIR)
|
||||
self.modified = (ld.update(self.files, ordered=True) or
|
||||
self.modified)
|
||||
self.modified = (ld.update(self.files) or self.modified)
|
||||
except ldapupdate.BadSyntax, e:
|
||||
root_logger.error('Bad syntax in upgrade %s' % str(e))
|
||||
self.modified = False
|
||||
|
Loading…
Reference in New Issue
Block a user