@@ -, +, @@
---
.../python/diagnostic/plugins/check_join_status.py | 73 ++++++++++++++++++++++
1 file changed, 73 insertions(+)
create mode 100644 management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/check_join_status.py
--- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/check_join_status.py
+++ a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/check_join_status.py
@@ -0,0 +1,73 @@
+#!/usr/bin/python2.7
+# coding: utf-8
+#
+# Univention Management Console module:
+# System Diagnosis UMC module
+#
+# Copyright 2016 Univention GmbH
+#
+# http://www.univention.de/
+#
+# All rights reserved.
+#
+# The source code of this program is made available
+# under the terms of the GNU Affero General Public License version 3
+# (GNU AGPL V3) as published by the Free Software Foundation.
+#
+# Binary versions of this program provided by Univention to you as
+# well as other copyrighted, protected or trademarked materials like
+# Logos, graphics, fonts, specific documentations and configurations,
+# cryptographic keys etc. are subject to a license agreement between
+# you and Univention and not subject to the GNU AGPL V3.
+#
+# In the case you use this program under the terms of the GNU AGPL V3,
+# the program is provided in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public
+# License with the Debian GNU/Linux or Univention distribution in file
+# /usr/share/common-licenses/AGPL-3; if not, see
+# .
+
+from subprocess import Popen, PIPE, STDOUT
+from univention.management.console.modules.diagnostic import Critical
+
+from univention.lib.i18n import Translation
+_ = Translation('univention-management-console-module-diagnostic').translate
+
+title = _('Check join status')
+description = _('The check for the join status was succsesful.')
+
+
+def run():
+ try:
+ process = Popen(['univention-check-join-status'], stdout=PIPE, stderr=STDOUT)
+ if process.returncode:
+ description = _('Call of "univention-check-join-status failed')
+ raise Critical('\n'.join([
+ description,
+ "Returncode of process: %s" % (process.returncode)
+ ]))
+ stdout, stderr = process.communicate()
+ if "Joined successfully" not in stdout:
+ description = _('"univention-check-join-status" returned a problem with domain join.')
+ raise Critical('\n'.join([
+ description,
+ "stdout: %s" % (stdout),
+ "stderr: %s" % (stderr)
+ ]))
+ except Critical:
+ raise
+ except Exception as ex:
+ description = _('Problem with plugin check_join_status.py.')
+ raise Critical('\n'.join([
+ description,
+ "Exception-Type: %s" % (ex.__class__),
+ "Exception-Message: %s" % (ex.message)
+ ]))
+
+if __name__ == '__main__':
+ from univention.management.console.modules.diagnostic import main
+ main()
--
check_join_status
---
.../python/diagnostic/plugins/check_join_status.py | 41 +++++++++-------------
1 file changed, 16 insertions(+), 25 deletions(-)
--- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/check_join_status.py
+++ a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/check_join_status.py
@@ -39,34 +39,25 @@ _ = Translation('univention-management-console-module-diagnostic').translate
title = _('Check join status')
description = _('The check for the join status was succsesful.')
+links = [{
+ 'name': 'erroranalysis',
+ 'href': _('http://docs.software-univention.de/manual.html#domain:listenernotifier:erroranalysis'),
+ 'label': _('Manual: Analysis of listener/notifier problems')
+}]
+umc_modules = [{'module': 'join'}]
def run():
- try:
- process = Popen(['univention-check-join-status'], stdout=PIPE, stderr=STDOUT)
- if process.returncode:
- description = _('Call of "univention-check-join-status failed')
- raise Critical('\n'.join([
- description,
- "Returncode of process: %s" % (process.returncode)
- ]))
- stdout, stderr = process.communicate()
- if "Joined successfully" not in stdout:
- description = _('"univention-check-join-status" returned a problem with domain join.')
- raise Critical('\n'.join([
- description,
- "stdout: %s" % (stdout),
- "stderr: %s" % (stderr)
- ]))
- except Critical:
- raise
- except Exception as ex:
- description = _('Problem with plugin check_join_status.py.')
- raise Critical('\n'.join([
- description,
- "Exception-Type: %s" % (ex.__class__),
- "Exception-Message: %s" % (ex.message)
- ]))
+ process = Popen(['univention-check-join-status'], stdout=PIPE, stderr=STDOUT)
+ (stdout, stderr) = process.communicate()
+ if process.returncode != 0:
+ errors = [_('"univention-check-join-status" returned a problem with the domain join.')]
+ if stdout:
+ errors.append("\nSTDOUT:\n{}".format(stdout))
+ if stderr:
+ errors.append("\nSTDERR:\n{}".format(stderr))
+ errors.append(_('See {erroranalysis} or run the join-scripts via {join}.'))
+ raise Critical(description='\n'.join(errors))
if __name__ == '__main__':
from univention.management.console.modules.diagnostic import main
--
check_join_status (po)
---
.../umc/python/diagnostic/de.po | 38 ++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
--- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/de.po
+++ a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/de.po
@@ -2,8 +2,8 @@
msgid ""
msgstr ""
"Project-Id-Version: univention-management-console-module-diagnostic\n"
-"Report-Msgid-Bugs-To: packages@univention.de\n"
-"POT-Creation-Date: 2016-01-14 12:19+0100\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-05-31 18:25+0200\n"
"PO-Revision-Date: \n"
"Last-Translator: Univention GmbH \n"
"Language-Team: Univention GmbH \n"
@@ -12,6 +12,13 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+#: umc/python/diagnostic/plugins/check_join_status.py:54
+msgid ""
+"\"univention-check-join-status\" returned a problem with the domain join."
+msgstr ""
+"\"univention-check-join-status\" gab einen Fehler mit dem Domänenbeitritt "
+"zurück."
+
#: umc/python/diagnostic/plugins/nameserver.py:15
#, python-format
msgid "%d of the configured nameservers are not responding to DNS queries."
@@ -27,6 +34,10 @@ msgstr ""
msgid "Adjust to suggested limits"
msgstr "An vorgeschlagene Limits anpassen"
+#: umc/python/diagnostic/plugins/check_join_status.py:40
+msgid "Check join status"
+msgstr "Überprüfe den Zustand des Domänenbeitritts"
+
#: umc/python/diagnostic/plugins/gateway.py:11
msgid "Gateway is not reachable"
msgstr "Gateway ist nicht erreichbar"
@@ -86,6 +97,10 @@ msgstr ""
"Stellen Sie sicher, dass die Hardware des Gateway-Geräts korrekt "
"funktioniert."
+#: umc/python/diagnostic/plugins/check_join_status.py:45
+msgid "Manual: Analysis of listener/notifier problems"
+msgstr "Handbuch: Analyse von Listener/Notifier-Problemen"
+
#: umc/python/diagnostic/plugins/package_status.py:15
msgid ""
"More information about the cause can be gained by executing \"dpkg --audit\"."
@@ -137,10 +152,21 @@ msgstr "SSH-Verbindung zu anderem UCS Server fehlgeschlagen!"
msgid "Security limits exceeded"
msgstr "Sicherheitslimits überschritten"
+#: umc/python/diagnostic/plugins/check_join_status.py:59
+#, python-brace-format
+msgid "See {erroranalysis} or run the join-scripts via {join}."
+msgstr ""
+"Siehe {erroranalysis} oder führen Sie ausstehende JOIN-Skripte via {join} "
+"aus."
+
#: umc/python/diagnostic/__init__.py:262
msgid "Test again"
msgstr "Erneut testen"
+#: umc/python/diagnostic/plugins/check_join_status.py:41
+msgid "The check for the join status was succsesful."
+msgstr "Die Überprüfung des Domänenbeitritts war erfolgreich."
+
#: umc/python/diagnostic/plugins/ssh_connection.py:48
msgid ""
"The following list shows the affected remote servers and the reason for the "
@@ -260,6 +286,14 @@ msgstr ""
"dass Authentifikations-Zugangsdaten (falls existierend) korrekt sind und die "
"ACL's des Proxy-Servers nicht verbieten, Anfragen an %s zu stellen."
+#: umc/python/diagnostic/plugins/check_join_status.py:44
+msgid ""
+"http://docs.software-univention.de/manual.html#domain:listenernotifier:"
+"erroranalysis"
+msgstr ""
+"http://docs.software-univention.de/handbuch.html#domain:listenernotifier:"
+"erroranalysis"
+
#: umc/python/diagnostic/plugins/package_status.py:28
msgid "some"
msgstr "einigen"
--