diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/__init__.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/__init__.py index 37a5466915..ea59abaa8e 100644 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/__init__.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/__init__.py @@ -100,7 +100,8 @@ class Instance(Base, ProgressMixin): def run(self, plugin, args=None): plugin = self.get(plugin) MODULE.process('Running %s' % (plugin,)) - MODULE.process(''.join(plugin.run_descr,)) + for line in plugin.run_descr: + MODULE.process(line) args = args or {} def thread(self, request): return plugin.execute(self, **args) diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/de.po b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/de.po index f707cda7f3..36a157fc8a 100644 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/de.po +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/de.po @@ -345,11 +345,11 @@ msgstr "" #: umc/python/diagnostic/plugins/53_package_status.py:14 msgid "" -"Login to the system as root via ssh and run the command \"dpkg --configure -a" -"\" in order to correct the packages status." +"You may log in to the system as root via ssh and run the command \"dpkg " +"--configure -a\" as an attempt to correct the packages status." msgstr "" -"Um den Paketstatus zu korrigieren loggen Sie sich am System per ssh als root " -"ein und führen Sie das Kommando \"dpkg --configure -a\" aus." +"Um den Paketstatus zu korrigieren, können Sie sich am System per ssh als " +"root einloggen und das Kommando \"dpkg --configure -a\" ausführen." #: umc/python/diagnostic/plugins/01_ssh_connection.py:66 msgid "Machine authentication failed" diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/00_check_server_password.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/00_check_server_password.py index bba1719d60..caa8881a12 100644 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/00_check_server_password.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/00_check_server_password.py @@ -48,7 +48,7 @@ from univention.management.console.modules.diagnostic import Critical, ProblemFi from univention.lib.i18n import Translation _ = Translation('univention-management-console-module-diagnostic').translate -run_descr = ["Trying to authenticatate with machine password against LDAP Similar to running: univention-ldapsearch -LLLs base dn"] +run_descr = ['Trying to authenticate with machine password against LDAP', 'Similar to running: univention-ldapsearch -LLLs base dn'] title = _('Check machine password') description = _('Authentication with machine password against LDAP successful.') links = [{ diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/01_ssh_connection.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/01_ssh_connection.py index 6faf4eab0d..d23636805a 100644 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/01_ssh_connection.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/01_ssh_connection.py @@ -16,7 +16,8 @@ _ = Translation('univention-management-console-module-diagnostic').translate title = _('SSH connection to UCS server failed!') -run_descr =['This can be checked by running: univention-ssh /etc/machine.secret "%s$"@%s echo OK' % (ucr["hostname"], 'fqdn')] +ucr.load() +run_descr = ['This can be checked by running: univention-ssh /etc/machine.secret "%s$"@%s echo OK' % (ucr["hostname"], 'fqdn')] class IgnorePolicy(paramiko.MissingHostKeyPolicy): def missing_host_key(self, client, hostname, key): @@ -24,7 +25,6 @@ class IgnorePolicy(paramiko.MissingHostKeyPolicy): def run(_umc_instance): - ucr.load() # Now a workaround for paramico logging to connector-s4.log # because one of the diagnostic plugins instanciates s4connector.s4.s4() # which initializes univention.debug2, which initializes logging.basicConfig diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/02_certificate_check.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/02_certificate_check.py index b95b494cfc..3cd31b652b 100755 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/02_certificate_check.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/02_certificate_check.py @@ -47,7 +47,7 @@ from univention.management.console.modules.diagnostic import Critical, Warning, from univention.lib.i18n import Translation _ = Translation('univention-management-console-module-diagnostic').translate -run_descr=['This can be checked by running ucr get server/roles and ucr get ldap/master'] +run_descr=['This can be checked by running: ucr get server/roles and ucr get ldap/master'] title = _('Check validity of SSL certificates') description = _('All SSL certificates valid.') links = [{ diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/03_check_notifier_replication.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/03_check_notifier_replication.py index 08428667f9..9c8cfff115 100755 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/03_check_notifier_replication.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/03_check_notifier_replication.py @@ -37,7 +37,7 @@ import univention.config_registry from univention.management.console.modules.diagnostic import Warning, MODULE from univention.lib.i18n import Translation _ = Translation('univention-management-console-module-diagnostic').translate -run_descr=['get id of ucr get ldap/master and check if var/lib/univention-directory-listener/notifier_id) is the same '] +run_descr=['get last_id from ldap/master and check that /var/lib/univention-directory-listener/notifier_id is the same'] title = _('Check for problems with UDN replication') description = _('No problems found with UDN replication.') diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/10_gateway.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/10_gateway.py index 83fd0a72dd..97c82e1d38 100644 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/10_gateway.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/10_gateway.py @@ -20,7 +20,7 @@ umc_modules = [{ 'flavor': 'network' }] -run_descr =['This can be checked by using ucr get gateway'] +run_descr =['This can be checked by running: ping "$(ucr get gateway)"'] def run(_umc_instance): ucr.load() diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/11_nameserver.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/11_nameserver.py index 37c2a7ddb3..d03f9b4158 100644 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/11_nameserver.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/11_nameserver.py @@ -28,17 +28,18 @@ def run(_umc_instance): ucr.load() failed = [] + fqdn = ".".join((ucr['hostname'], ucr['domainname'])) hostnames = { 'www.univention.de': ('dns/forwarder1', 'dns/forwarder2', 'dns/forwarder3'), - ucr.get('hostname', ''): ('nameserver1', 'nameserver2', 'nameserver3') + fqdn: ('nameserver1', 'nameserver2', 'nameserver3') } for hostname, nameservers in hostnames.iteritems(): for nameserver in nameservers: if not ucr.get(nameserver): continue - MODULE.process("Similar to running: dig +short %s @%s" %(hostname,ucr[nameserver])) MODULE.process("Trying %s to resolve %s" %(ucr[nameserver],hostname)) + MODULE.process("Similar to running: dig +short %s @%s" %(hostname,ucr[nameserver])) try: query_dns_server(ucr[nameserver], hostname) except DNSException as exc: diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/20_check_nameservers.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/20_check_nameservers.py index 19351857ed..4bf4a193dc 100755 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/20_check_nameservers.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/20_check_nameservers.py @@ -170,8 +170,8 @@ class UDM(object): def find(self, nameserver): filter_expression = nameserver.build_filter() - MODULE.process("Trying to find nameserver %s in UDM/LDAP" %(nameserver)) - MODULE.process("Similar to running: univention-ldapsearch %s" %(filter_expression)) + MODULE.process("Trying to find nameserver %s in UDM/LDAP" %(nameserver.fqdn())) + MODULE.process("Similar to running: univention-ldapsearch '%s'" %(filter_expression)) for (dn, attr) in self.ldap_connection.search(filter_expression): if dn: for module in udm_modules.identify(dn, attr): diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/22_kdc_service.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/22_kdc_service.py index bd6433a416..51ab103036 100755 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/22_kdc_service.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/22_kdc_service.py @@ -56,7 +56,7 @@ _ = Translation('univention-management-console-module-diagnostic').translate title = _('KDC service check') description = ['The check for the KDC reachability was succesful.'] -run_descr = ['Makes a KDC reachability check'] +run_descr = ['Performs a KDC reachability check'] # This checks for the reachability of KDCs by sending a AS-REQ per TCP and UDP. @@ -248,8 +248,8 @@ def send_and_receive(kdc, port, protocol, as_req): def probe_kdc(kdc, port, protocol, target_realm, user_name): request = build_kerberos_request(target_realm, user_name) - MODULE.process("Trying to cantact KDC %s on port %d" %(kdc,port)) - MODULE.process("Similar to running: nmap%s -p %d" %(kdc,port)) + MODULE.process("Trying to contact KDC %s on port %d" %(kdc,port)) + MODULE.process("Similar to running: nmap %s -p %d" %(kdc,port)) try: received = send_and_receive(kdc, port, protocol, request) except KerberosException: diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/32_security_limits.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/32_security_limits.py index 210be4ef97..676fd4403c 100644 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/32_security_limits.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/32_security_limits.py @@ -32,7 +32,7 @@ buttons = [{ 'action': 'adjust' }] actions = {} # filled at bottom -run_descr = ['checks samba logfile /var/log/samba/log.smbd for "too many open files" messages \n checks if ucr get samba/max_open_files is set to the suggested value of 32808'] +run_descr = ['checks samba logfile /var/log/samba/log.smbd for "too many open files" messages', 'and checks if ucr get samba/max_open_files is set to the suggested value of 32808'] def run(_umc_instance): diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/40_samba_tool_dbcheck.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/40_samba_tool_dbcheck.py index 81a8383512..25cf449a18 100755 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/40_samba_tool_dbcheck.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/40_samba_tool_dbcheck.py @@ -38,7 +38,7 @@ _ = Translation('univention-management-console-module-diagnostic').translate title = _('Check local AD database for errors') description = _('No errors found.'), -run_descr = ['This can be checked by running samba-tool dbcheck'] +run_descr = ['This can be checked by running: samba-tool dbcheck'] def run_samba_tool_dbcheck_fix(umc_instance): diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/42_samba_tool_sysvolcheck.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/42_samba_tool_sysvolcheck.py index 7bd083c408..7b845aba93 100755 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/42_samba_tool_sysvolcheck.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/42_samba_tool_sysvolcheck.py @@ -39,7 +39,7 @@ _ = Translation('univention-management-console-module-diagnostic').translate title = _('Check Samba sysvol ACLs for errors') description = _('No errors found.'), -run_descr = ['This can be checked by running samba-tool ntacl sysvolcheck'] +run_descr = ['This can be checked by running: samba-tool ntacl sysvolcheck'] def run_samba_tool_ntacl_sysvolreset(umc_instance): if not util.is_service_active('Samba 4'): diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/46_kerberos_ddns_update.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/46_kerberos_ddns_update.py index 88f4f83ced..bf2a6232ee 100755 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/46_kerberos_ddns_update.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/46_kerberos_ddns_update.py @@ -81,7 +81,7 @@ class NSUpdateError(UpdateError): def kinit(principal, keytab=None, password_file=None): auth = '--keytab={tab}' if keytab else '--password-file={file}' cmd = ('kinit', auth.format(tab=keytab, file=password_file), principal) - MODULE.process('Running: %s' %(''.join(cmd))) + MODULE.process('Running: %s' %(' '.join(cmd))) try: subprocess.check_call(cmd) @@ -95,10 +95,11 @@ def kinit(principal, keytab=None, password_file=None): def nsupdate(server, domainname): process = subprocess.Popen(('nsupdate', '-g', '-t', '15'), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - cmd = 'server {server}\nprereq yxdomain {domain}\nsend\nquit\n' + cmd_template = 'server {server}\nprereq yxdomain {domain}\nsend\nquit\n' + cmd = cmd_template.format(server=server, domain=domainname) MODULE.process("Running: 'echo %s | nsupdate -g -t 15" %(cmd,)) - _ = process.communicate(cmd.format(server=server, domain=domainname)) + _ = process.communicate(cmd) if process.poll() != 0: raise NSUpdateError(server, domainname) diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/53_package_status.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/53_package_status.py index 43d14b14cd..ed850c05cc 100644 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/53_package_status.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/53_package_status.py @@ -11,11 +11,11 @@ _ = Translation('univention-management-console-module-diagnostic').translate title = _('Package status corrupt') description = '\n'.join([ _('The package status of %s packages is corrupt.'), - _('Login to the system as root via ssh and run the command "dpkg --configure -a" in order to correct the packages status.'), + _('You may log in to the system as root via ssh and run the command "dpkg --configure -a" as an attempt to correct the packages status.'), _('More information about the cause can be gained by executing "dpkg --audit".') ]) -run_descr = ['This can be checked by running: dpkg --audit Login to the system as root via ssh and run the command "dpkg --configure -a" in order to correct the packages status.'] +run_descr = ['This can be checked by running: dpkg --audit'] def run(_umc_instance): proccess = Popen(['dpkg', '--audit'], stdout=PIPE, env={'LANG': 'C'}) diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/54_sources_list_check.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/54_sources_list_check.py index 4d9dc322be..4c9e10439d 100755 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/54_sources_list_check.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/54_sources_list_check.py @@ -42,7 +42,7 @@ _ = Translation('univention-management-console-module-diagnostic').translate title = _('Check errors in sources.list files') description = _('All files ok.') -run_descr = [' Check by opening /etc/apt/sources.list.d/* and look for exceptions'] +run_descr = ['Looking for Python exceptions in /etc/apt/sources.list.d/*'] TRACEBACK_REGEX = re.compile((