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:
Martin Basti 2015-03-13 14:59:26 +01:00 committed by Tomas Babej
parent 0c7274ead8
commit a42fcfc18b
4 changed files with 4 additions and 5 deletions

View File

@ -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")

View File

@ -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')

View File

@ -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

View File

@ -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