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 authored and Tomas Babej committed 2015-03-19 12:37:09 +01:00
1 parent 0c7274ead8
commit a42fcfc18b
4 files changed
+4 -5

No files matched your search

+1 -1
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")
+1 -1
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')
+1 -1
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
+1 -2
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