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 | |
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>
-rw-r--r-- | install/tools/man/ipa-ldap-updater.1 | 10 | ||||
-rw-r--r-- | ipaserver/install/ipa_ldap_updater.py | 19 |
2 files changed, 9 insertions, 20 deletions
diff --git a/install/tools/man/ipa-ldap-updater.1 b/install/tools/man/ipa-ldap-updater.1 index 6d0feb440..4893802c2 100644 --- a/install/tools/man/ipa-ldap-updater.1 +++ b/install/tools/man/ipa-ldap-updater.1 @@ -21,11 +21,8 @@ ipa\-ldap\-updater \- Update the IPA LDAP configuration .SH "SYNOPSIS" ipa\-ldap\-updater [options] input_file(s) -ipa\-ldap\-updater [options] .SH "DESCRIPTION" -ipa\-ldap\-updater is used to apply updates to the IPA LDAP server when the IPA packages are being updated. It is not intended to be executed by end\-users. - -When run with no file arguments, ipa\-ldap\-updater will process all files with the extension .update in /usr/share/ipa/updates. +ipa\-ldap\-updater is utility which can be used to update the IPA LDAP server. An update file describes an LDAP entry and a set of operations to be performed on that entry. It can be used to add new entries or modify existing entries. @@ -81,7 +78,7 @@ This keyword is not bounded to DN, and plugin names have to be registered in API Additionally, ipa-ldap-updater can update the schema based on LDIF files. Any missing object classes and attribute types are added, and differing ones are updated to match the LDIF file. -To enable this behavior, use the \-\-schema or \-\-schema-file options. +To enable this behavior, use the \-\-schema-file options. Schema files should be in LDIF format, and may only specify attributeTypes and objectClasses attributes of cn=schema. .SH "OPTIONS" @@ -92,9 +89,6 @@ Enable debug logging when more verbose output is needed \fB\-u\fR, \fB\-\-upgrade\fR Upgrade an installed server in offline mode (implies \-\-schema) .TP -\fB\-s\fR, \fB\-\-schema\fR -Also update the LDAP schema. If no \-\-schema-file is specified, update to the built-in IPA schema. -.TP \fB\-S\fR, \fB\-\-schema\-file\fR Specify a schema file. May be used multiple times. Implies \-\-schema. .SH "EXIT STATUS" 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 |