diff options
author | Martin Basti <mbasti@redhat.com> | 2015-05-12 14:08:35 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-05-19 12:43:04 +0000 |
commit | 99c0b918a7cdf4ea6f24b4cbe687d9cafd21de24 (patch) | |
tree | 652ad436c54b5b61d05f72e68551bab2ddb737c2 /ipaserver | |
parent | 78baeeb77c867d00c9c1ceb41c58512e487abb0c (diff) | |
download | freeipa-99c0b918a7cdf4ea6f24b4cbe687d9cafd21de24.tar.gz freeipa-99c0b918a7cdf4ea6f24b4cbe687d9cafd21de24.tar.xz freeipa-99c0b918a7cdf4ea6f24b4cbe687d9cafd21de24.zip |
Server Upgrade: ipa-ldap-updater will not do overall upgrade
ipa-ldap-updater is now just util which applies changes specified in update
files or schema files.
ipa-ldap-updater will not do overall server upgrade anymore, use
ipa-server-upgrade instead.
https://fedorahosted.org/freeipa/ticket/4904
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver')
-rw-r--r-- | ipaserver/install/ipa_ldap_updater.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/ipaserver/install/ipa_ldap_updater.py b/ipaserver/install/ipa_ldap_updater.py index 40e8e7f72..f07eecf23 100644 --- a/ipaserver/install/ipa_ldap_updater.py +++ b/ipaserver/install/ipa_ldap_updater.py @@ -40,7 +40,6 @@ class LDAPUpdater(admintool.AdminTool): command_name = 'ipa-ldap-updater' usage = "%prog [options] input_file(s)\n" - usage += "%prog [options]\n" @classmethod def add_options(cls, parser): @@ -48,10 +47,6 @@ class LDAPUpdater(admintool.AdminTool): parser.add_option("-u", '--upgrade', action="store_true", dest="upgrade", default=False, help="upgrade an installed server in offline mode") - parser.add_option("-s", '--schema', action="store_true", - dest="update_schema", default=False, - help="update the schema " - "(implied when no input files are given)") parser.add_option("-S", '--schema-file', action="append", dest="schema_files", help="custom schema ldif file to use (implies -s)") @@ -69,6 +64,12 @@ class LDAPUpdater(admintool.AdminTool): self.files = self.args + if not (self.files or options.schema_files): + self.log.info("To execute overall IPA upgrade please use " + "'ipa-server-upgrade' command") + raise admintool.ScriptError("No update files or schema file were " + "specified") + for filename in self.files: if not os.path.exists(filename): raise admintool.ScriptError("%s: file not found" % filename) @@ -79,12 +80,6 @@ class LDAPUpdater(admintool.AdminTool): print unicode(e) sys.exit(1) - if options.schema_files or not self.files: - options.update_schema = True - if not options.schema_files: - options.schema_files = [os.path.join(ipautil.SHARE_DIR, f) for f - in dsinstance.ALL_SCHEMA_FILES] - def setup_logging(self): super(LDAPUpdater, self).setup_logging(log_file_mode='a') @@ -132,7 +127,7 @@ class LDAPUpdater_NonUpgrade(LDAPUpdater): modified = False - if options.update_schema: + if options.schema_files: modified = schemaupdate.update_schema( options.schema_files, ldapi=True) or modified |