summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2015-06-08 17:33:11 +0200
committerJan Cholasta <jcholast@redhat.com>2015-07-03 07:47:59 +0000
commit884afb5d38480e23c91ec14876bcf39151a2c2ed (patch)
tree15a4d06ec3e2634946987133aa762a25c3fa9eaa
parent66ea322e7e01266cc916156860b684adb21c618d (diff)
downloadfreeipa-884afb5d38480e23c91ec14876bcf39151a2c2ed.zip
freeipa-884afb5d38480e23c91ec14876bcf39151a2c2ed.tar.gz
freeipa-884afb5d38480e23c91ec14876bcf39151a2c2ed.tar.xz
Server Upgrade: use debug log level for upgrade instead of info
Upgrade contains too many unnecessary info logs. Reviewed-By: Jan Cholasta <jcholast@redhat.com>
-rw-r--r--ipalib/plugins/permission.py2
-rw-r--r--ipaserver/install/ldapupdate.py30
-rw-r--r--ipaserver/install/plugins/adtrust.py4
-rw-r--r--ipaserver/install/plugins/dns.py8
-rw-r--r--ipaserver/install/plugins/update_idranges.py2
-rw-r--r--ipaserver/install/plugins/update_managed_permissions.py22
-rw-r--r--ipaserver/install/plugins/update_referint.py2
-rw-r--r--ipaserver/install/schemaupdate.py10
8 files changed, 40 insertions, 40 deletions
diff --git a/ipalib/plugins/permission.py b/ipalib/plugins/permission.py
index f46affc..f2e8969 100644
--- a/ipalib/plugins/permission.py
+++ b/ipalib/plugins/permission.py
@@ -648,7 +648,7 @@ class permission(baseldap.LDAPObject):
try:
ldap.update_entry(acientry)
except errors.EmptyModlist:
- self.log.info('No changes to ACI')
+ self.log.debug('No changes to ACI')
return acientry, acistring
def _get_aci_entry_and_string(self, permission_entry, name=None,
diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py
index 848ff1d..6f796df 100644
--- a/ipaserver/install/ldapupdate.py
+++ b/ipaserver/install/ldapupdate.py
@@ -543,7 +543,7 @@ class LDAPUpdate:
nsIndexAttribute=[attribute],
)
- self.info("Creating task to index attribute: %s", attribute)
+ self.debug("Creating task to index attribute: %s", attribute)
self.debug("Task id: %s", dn)
self.conn.add_entry(e)
@@ -579,7 +579,7 @@ class LDAPUpdate:
continue
if status.lower().find("finished") > -1:
- self.info("Indexing finished")
+ self.debug("Indexing finished")
break
self.debug("Indexing in progress")
@@ -651,7 +651,7 @@ class LDAPUpdate:
try:
entry_values.remove(update_value)
except ValueError:
- self.warning("remove: '%s' not in %s", update_value, attr)
+ self.debug("remove: '%s' not in %s", update_value, attr)
else:
entry[attr] = entry_values
self.debug('remove: updated value %s', safe_output(
@@ -745,15 +745,15 @@ class LDAPUpdate:
raise BadSyntax, "More than 1 entry returned on a dn search!? %s" % new_entry.dn
entry = e[0]
found = True
- self.info("Updating existing entry: %s", entry.dn)
+ self.debug("Updating existing entry: %s", entry.dn)
except errors.NotFound:
# Doesn't exist, start with the default entry
entry = new_entry
- self.info("New entry: %s", entry.dn)
+ self.debug("New entry: %s", entry.dn)
except errors.DatabaseError:
# Doesn't exist, start with the default entry
entry = new_entry
- self.info("New entry, using default value: %s", entry.dn)
+ self.debug("New entry, using default value: %s", entry.dn)
self.print_entity(entry, "Initial value")
@@ -778,8 +778,8 @@ class LDAPUpdate:
except errors.NotFound:
# parent entry of the added entry does not exist
# this may not be an error (e.g. entries in NIS container)
- self.info("Parent DN of %s may not exist, cannot create the entry",
- entry.dn)
+ self.error("Parent DN of %s may not exist, cannot "
+ "create the entry", entry.dn)
return
added = True
self.modified = True
@@ -798,9 +798,9 @@ class LDAPUpdate:
self.debug("Updated %d" % updated)
if updated:
self.conn.update_entry(entry)
- self.info("Done")
+ self.debug("Done")
except errors.EmptyModlist:
- self.info("Entry already up-to-date")
+ self.debug("Entry already up-to-date")
updated = False
except errors.DatabaseError, e:
self.error("Update failed: %s", e)
@@ -826,11 +826,11 @@ class LDAPUpdate:
dn = updates['dn']
try:
- self.info("Deleting entry %s", dn)
+ self.debug("Deleting entry %s", dn)
self.conn.delete_entry(dn)
self.modified = True
except errors.NotFound, e:
- self.info("%s did not exist:%s", dn, e)
+ self.debug("%s did not exist:%s", dn, e)
self.modified = True
except errors.DatabaseError, e:
self.error("Delete failed: %s", e)
@@ -848,7 +848,7 @@ class LDAPUpdate:
return f
def _run_update_plugin(self, plugin_name):
- self.log.info("Executing upgrade plugin: %s", plugin_name)
+ self.log.debug("Executing upgrade plugin: %s", plugin_name)
restart_ds, updates = self.api.Updater[plugin_name]()
if updates:
self._run_updates(updates)
@@ -895,7 +895,7 @@ class LDAPUpdate:
for f in upgrade_files:
try:
- self.info("Parsing update file '%s'" % f)
+ self.debug("Parsing update file '%s'" % f)
data = self.read_file(f)
except Exception, e:
self.error("error reading update file '%s'", f)
@@ -931,6 +931,6 @@ class LDAPUpdate:
def restart_ds(self):
dirsrv = services.knownservices.dirsrv
- self.log.info('Restarting directory server to apply updates')
+ self.log.debug('Restarting directory server to apply updates')
dirsrv.restart()
wait_for_open_socket(self.socket_name)
diff --git a/ipaserver/install/plugins/adtrust.py b/ipaserver/install/plugins/adtrust.py
index 941bb63..d96bfe8 100644
--- a/ipaserver/install/plugins/adtrust.py
+++ b/ipaserver/install/plugins/adtrust.py
@@ -139,7 +139,7 @@ class update_default_trust_view(Updater):
# First, see if trusts are enabled on the server
if not self.api.Command.adtrust_is_enabled()['result']:
- self.log.info('AD Trusts are not enabled on this server')
+ self.log.debug('AD Trusts are not enabled on this server')
return False, []
# Second, make sure the Default Trust View does not exist yet
@@ -148,7 +148,7 @@ class update_default_trust_view(Updater):
except errors.NotFound:
pass
else:
- self.log.info('Default Trust View already present on this server')
+ self.log.debug('Default Trust View already present on this server')
return False, []
# We have a server with AD trust support without Default Trust View.
diff --git a/ipaserver/install/plugins/dns.py b/ipaserver/install/plugins/dns.py
index aafea44..3d40e0e 100644
--- a/ipaserver/install/plugins/dns.py
+++ b/ipaserver/install/plugins/dns.py
@@ -64,7 +64,7 @@ class update_dnszones(Updater):
try:
zones = self.api.Command.dnszone_find(all=True)['result']
except errors.NotFound:
- self.log.info('No DNS zone to update found')
+ self.log.debug('No DNS zone to update found')
return False, []
for zone in zones:
@@ -173,7 +173,7 @@ class update_master_to_dnsforwardzones(Updater):
# no upgrade is required
return False, []
- self.log.info('Updating forward zones')
+ self.log.debug('Updating forward zones')
# update the DNSVersion, following upgrade can be executed only once
container_entry.setdefault(
'ipaConfigString', []).append(u"DNSVersion 1")
@@ -202,7 +202,7 @@ class update_master_to_dnsforwardzones(Updater):
pass
if not zones:
- self.log.info('No DNS zone to update found')
+ self.log.debug('No DNS zone to update found')
return False, []
zones_to_transform = []
@@ -346,7 +346,7 @@ class update_master_to_dnsforwardzones(Updater):
zone['idnsname'][0])
continue
- self.log.info('Zone %s was sucessfully transformed to forward zone',
+ self.log.debug('Zone %s was sucessfully transformed to forward zone',
zone['idnsname'][0])
return False, []
diff --git a/ipaserver/install/plugins/update_idranges.py b/ipaserver/install/plugins/update_idranges.py
index 3181e9e..badde94 100644
--- a/ipaserver/install/plugins/update_idranges.py
+++ b/ipaserver/install/plugins/update_idranges.py
@@ -152,7 +152,7 @@ class update_idrange_baserid(Updater):
for entry in entries:
entry['ipabaserid'] = 0
try:
- root_logger.info("Updating existing idrange: %s" % (entry.dn))
+ root_logger.debug("Updating existing idrange: %s" % (entry.dn))
ldap.update_entry(entry)
root_logger.info("Done")
except (errors.EmptyModlist, errors.NotFound):
diff --git a/ipaserver/install/plugins/update_managed_permissions.py b/ipaserver/install/plugins/update_managed_permissions.py
index a2f289f..563dbb0 100644
--- a/ipaserver/install/plugins/update_managed_permissions.py
+++ b/ipaserver/install/plugins/update_managed_permissions.py
@@ -383,7 +383,7 @@ class update_managed_permissions(Updater):
for acistr in acistrs:
if ACI(acistr).isequal(anonymous_read_aci):
- self.log.info('Removing anonymous ACI: %s', acistr)
+ self.log.debug('Removing anonymous ACI: %s', acistr)
acistrs.remove(acistr)
break
else:
@@ -412,18 +412,18 @@ class update_managed_permissions(Updater):
anonymous_read_aci = self.get_anonymous_read_aci(ldap)
if anonymous_read_aci:
- self.log.info('Anonymous read ACI: %s', anonymous_read_aci)
+ self.log.debug('Anonymous read ACI: %s', anonymous_read_aci)
else:
- self.log.info('Anonymous ACI not found')
+ self.log.debug('Anonymous ACI not found')
current_obj = () # initially distinct from any obj value, even None
for name, template, obj in self.get_templates():
if current_obj != obj:
if obj:
- self.log.info('Updating managed permissions for %s',
+ self.log.debug('Updating managed permissions for %s',
obj.name)
else:
- self.log.info('Updating non-object managed permissions')
+ self.log.debug('Updating non-object managed permissions')
current_obj = obj
self.update_permission(ldap,
@@ -444,7 +444,7 @@ class update_managed_permissions(Updater):
except errors.NotFound:
self.log.debug('Obsolete permission not found')
else:
- self.log.info('Obsolete permission deleted: %s', obsolete_name)
+ self.log.debug('Obsolete permission deleted: %s', obsolete_name)
return False, ()
@@ -536,7 +536,7 @@ class update_managed_permissions(Updater):
permission_plugin.update_aci(entry)
if remove_legacy:
- self.log.info("Removing legacy permission '%s'", legacy_name)
+ self.log.debug("Removing legacy permission '%s'", legacy_name)
self.api.Command[permission_del](unicode(legacy_name))
for name in template.get('replaces_system', ()):
@@ -545,14 +545,14 @@ class update_managed_permissions(Updater):
entry = ldap.get_entry(permission_plugin.get_dn(name),
['ipapermissiontype'])
except errors.NotFound:
- self.log.info("Legacy permission '%s' not found", name)
+ self.log.debug("Legacy permission '%s' not found", name)
else:
flags = entry.get('ipapermissiontype', [])
if list(flags) == ['SYSTEM']:
- self.log.info("Removing legacy permission '%s'", name)
+ self.log.debug("Removing legacy permission '%s'", name)
self.api.Command[permission_del](name, force=True)
else:
- self.log.info("Ignoring V2 permission '%s'", name)
+ self.log.debug("Ignoring V2 permission '%s'", name)
def get_upgrade_attr_lists(self, current_acistring, default_acistrings):
"""Compute included and excluded attributes for a new permission
@@ -715,7 +715,7 @@ class update_managed_permissions(Updater):
anonymous_read_aci.target['targetattr']['expression'])
read_blacklist &= attributes
if read_blacklist:
- self.log.info('Excluded attributes for %s: %s',
+ self.log.debug('Excluded attributes for %s: %s',
name, ', '.join(read_blacklist))
entry['ipapermexcludedattr'] = list(read_blacklist)
diff --git a/ipaserver/install/plugins/update_referint.py b/ipaserver/install/plugins/update_referint.py
index 960a5ad..c5c8035 100644
--- a/ipaserver/install/plugins/update_referint.py
+++ b/ipaserver/install/plugins/update_referint.py
@@ -45,7 +45,7 @@ class update_referint(Updater):
entry['referint-update-delay'] = update_delay
entry['nsslapd-pluginArg0'] = None
else:
- root_logger.info("Plugin already uses new style, skipping")
+ root_logger.debug("Plugin already uses new style, skipping")
return False, []
# nsslapd-pluginArg1 -> referint-logfile
diff --git a/ipaserver/install/schemaupdate.py b/ipaserver/install/schemaupdate.py
index 9a882c9..03edb63 100644
--- a/ipaserver/install/schemaupdate.py
+++ b/ipaserver/install/schemaupdate.py
@@ -124,7 +124,7 @@ def update_schema(schema_files, ldapi=False, dm_password=None,):
for attr in schema_entry[attrname]}
for filename in schema_files:
- log.info('Processing schema LDIF file %s', filename)
+ log.debug('Processing schema LDIF file %s', filename)
dn, new_schema = ldap.schema.subentry.urlfetch(filename)
for attrname, cls in SCHEMA_ELEMENT_CLASSES:
@@ -147,10 +147,10 @@ def update_schema(schema_files, ldapi=False, dm_password=None,):
if old_obj:
old_attr = old_entries_by_oid.get(oid)
- log.info('Replace: %s', old_attr)
- log.info(' with: %s', value)
+ log.debug('Replace: %s', old_attr)
+ log.debug(' with: %s', value)
else:
- log.info('Add: %s', value)
+ log.debug('Add: %s', value)
modified = modified or new_elements
schema_entry[attrname].extend(new_elements)
@@ -163,7 +163,7 @@ def update_schema(schema_files, ldapi=False, dm_password=None,):
conn.update_entry(schema_entry)
if not modified:
- log.info('Not updating schema')
+ log.debug('Not updating schema')
return modified