mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
parent
78baeeb77c
commit
99c0b918a7
@ -21,11 +21,8 @@
|
|||||||
ipa\-ldap\-updater \- Update the IPA LDAP configuration
|
ipa\-ldap\-updater \- Update the IPA LDAP configuration
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
ipa\-ldap\-updater [options] input_file(s)
|
ipa\-ldap\-updater [options] input_file(s)
|
||||||
ipa\-ldap\-updater [options]
|
|
||||||
.SH "DESCRIPTION"
|
.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.
|
ipa\-ldap\-updater is utility which can be used to update the IPA LDAP server.
|
||||||
|
|
||||||
When run with no file arguments, ipa\-ldap\-updater will process all files with the extension .update in /usr/share/ipa/updates.
|
|
||||||
|
|
||||||
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.
|
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.
|
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.
|
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.
|
Schema files should be in LDIF format, and may only specify attributeTypes and objectClasses attributes of cn=schema.
|
||||||
|
|
||||||
.SH "OPTIONS"
|
.SH "OPTIONS"
|
||||||
@ -92,9 +89,6 @@ Enable debug logging when more verbose output is needed
|
|||||||
\fB\-u\fR, \fB\-\-upgrade\fR
|
\fB\-u\fR, \fB\-\-upgrade\fR
|
||||||
Upgrade an installed server in offline mode (implies \-\-schema)
|
Upgrade an installed server in offline mode (implies \-\-schema)
|
||||||
.TP
|
.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
|
\fB\-S\fR, \fB\-\-schema\-file\fR
|
||||||
Specify a schema file. May be used multiple times. Implies \-\-schema.
|
Specify a schema file. May be used multiple times. Implies \-\-schema.
|
||||||
.SH "EXIT STATUS"
|
.SH "EXIT STATUS"
|
||||||
|
@ -40,7 +40,6 @@ class LDAPUpdater(admintool.AdminTool):
|
|||||||
command_name = 'ipa-ldap-updater'
|
command_name = 'ipa-ldap-updater'
|
||||||
|
|
||||||
usage = "%prog [options] input_file(s)\n"
|
usage = "%prog [options] input_file(s)\n"
|
||||||
usage += "%prog [options]\n"
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def add_options(cls, parser):
|
def add_options(cls, parser):
|
||||||
@ -48,10 +47,6 @@ class LDAPUpdater(admintool.AdminTool):
|
|||||||
parser.add_option("-u", '--upgrade', action="store_true",
|
parser.add_option("-u", '--upgrade', action="store_true",
|
||||||
dest="upgrade", default=False,
|
dest="upgrade", default=False,
|
||||||
help="upgrade an installed server in offline mode")
|
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",
|
parser.add_option("-S", '--schema-file', action="append",
|
||||||
dest="schema_files",
|
dest="schema_files",
|
||||||
help="custom schema ldif file to use (implies -s)")
|
help="custom schema ldif file to use (implies -s)")
|
||||||
@ -69,6 +64,12 @@ class LDAPUpdater(admintool.AdminTool):
|
|||||||
|
|
||||||
self.files = self.args
|
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:
|
for filename in self.files:
|
||||||
if not os.path.exists(filename):
|
if not os.path.exists(filename):
|
||||||
raise admintool.ScriptError("%s: file not found" % filename)
|
raise admintool.ScriptError("%s: file not found" % filename)
|
||||||
@ -79,12 +80,6 @@ class LDAPUpdater(admintool.AdminTool):
|
|||||||
print unicode(e)
|
print unicode(e)
|
||||||
sys.exit(1)
|
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):
|
def setup_logging(self):
|
||||||
super(LDAPUpdater, self).setup_logging(log_file_mode='a')
|
super(LDAPUpdater, self).setup_logging(log_file_mode='a')
|
||||||
|
|
||||||
@ -132,7 +127,7 @@ class LDAPUpdater_NonUpgrade(LDAPUpdater):
|
|||||||
|
|
||||||
modified = False
|
modified = False
|
||||||
|
|
||||||
if options.update_schema:
|
if options.schema_files:
|
||||||
modified = schemaupdate.update_schema(
|
modified = schemaupdate.update_schema(
|
||||||
options.schema_files,
|
options.schema_files,
|
||||||
ldapi=True) or modified
|
ldapi=True) or modified
|
||||||
|
Loading…
Reference in New Issue
Block a user