View | Details | Raw Unified | Return to bug 35860
Collapse All | Expand All

(-)a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/check_join_status.py (-2 / +73 lines)
Line 0    Link Here 
0
- 
1
#!/usr/bin/python2.7
2
# coding: utf-8
3
#
4
# Univention Management Console module:
5
#  System Diagnosis UMC module
6
#
7
# Copyright 2016 Univention GmbH
8
#
9
# http://www.univention.de/
10
#
11
# All rights reserved.
12
#
13
# The source code of this program is made available
14
# under the terms of the GNU Affero General Public License version 3
15
# (GNU AGPL V3) as published by the Free Software Foundation.
16
#
17
# Binary versions of this program provided by Univention to you as
18
# well as other copyrighted, protected or trademarked materials like
19
# Logos, graphics, fonts, specific documentations and configurations,
20
# cryptographic keys etc. are subject to a license agreement between
21
# you and Univention and not subject to the GNU AGPL V3.
22
#
23
# In the case you use this program under the terms of the GNU AGPL V3,
24
# the program is provided in the hope that it will be useful,
25
# but WITHOUT ANY WARRANTY; without even the implied warranty of
26
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
# GNU Affero General Public License for more details.
28
#
29
# You should have received a copy of the GNU Affero General Public
30
# License with the Debian GNU/Linux or Univention distribution in file
31
# /usr/share/common-licenses/AGPL-3; if not, see
32
# <http://www.gnu.org/licenses/>.
33
34
from subprocess import Popen, PIPE, STDOUT
35
from univention.management.console.modules.diagnostic import Critical
36
37
from univention.lib.i18n import Translation
38
_ = Translation('univention-management-console-module-diagnostic').translate
39
40
title = _('Check join status')
41
description = _('The check for the join status was succsesful.')
42
43
44
def run():
45
	try:
46
		process = Popen(['univention-check-join-status'], stdout=PIPE, stderr=STDOUT)
47
		if process.returncode:
48
			description = _('Call of "univention-check-join-status failed')
49
			raise Critical('\n'.join([
50
				description,
51
				"Returncode of process: %s" % (process.returncode)
52
			]))
53
		stdout, stderr = process.communicate()
54
		if "Joined successfully" not in stdout:
55
			description = _('"univention-check-join-status" returned a problem with domain join.')
56
			raise Critical('\n'.join([
57
				description,
58
				"stdout: %s" % (stdout),
59
				"stderr: %s" % (stderr)
60
			]))
61
	except Critical:
62
		raise
63
	except Exception as ex:
64
		description = _('Problem with plugin check_join_status.py.')
65
		raise Critical('\n'.join([
66
			description,
67
			"Exception-Type: %s" % (ex.__class__),
68
			"Exception-Message: %s" % (ex.message)
69
		]))
70
71
if __name__ == '__main__':
72
	from univention.management.console.modules.diagnostic import main
73
	main()
1
check_join_status
74
check_join_status
2
--
3
.../python/diagnostic/plugins/check_join_status.py | 41 +++++++++-------------
75
.../python/diagnostic/plugins/check_join_status.py | 41 +++++++++-------------
4
1 file changed, 16 insertions(+), 25 deletions(-)
76
1 file changed, 16 insertions(+), 25 deletions(-)
(-)a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/check_join_status.py (-27 / +16 lines)
 Lines 39-72   _ = Translation('univention-management-console-module-diagnostic').translate Link Here 
39
39
40
title = _('Check join status')
40
title = _('Check join status')
41
description = _('The check for the join status was succsesful.')
41
description = _('The check for the join status was succsesful.')
42
links = [{
43
	'name': 'erroranalysis',
44
	'href': _('http://docs.software-univention.de/manual.html#domain:listenernotifier:erroranalysis'),
45
	'label': _('Manual: Analysis of listener/notifier problems')
46
}]
47
umc_modules = [{'module': 'join'}]
42
48
43
49
44
def run():
50
def run():
45
	try:
51
	process = Popen(['univention-check-join-status'], stdout=PIPE, stderr=STDOUT)
46
		process = Popen(['univention-check-join-status'], stdout=PIPE, stderr=STDOUT)
52
	(stdout, stderr) = process.communicate()
47
		if process.returncode:
53
	if process.returncode != 0:
48
			description = _('Call of "univention-check-join-status failed')
54
		errors = [_('"univention-check-join-status" returned a problem with the domain join.')]
49
			raise Critical('\n'.join([
55
		if stdout:
50
				description,
56
			errors.append("\nSTDOUT:\n{}".format(stdout))
51
				"Returncode of process: %s" % (process.returncode)
57
		if stderr:
52
			]))
58
			errors.append("\nSTDERR:\n{}".format(stderr))
53
		stdout, stderr = process.communicate()
59
		errors.append(_('See {erroranalysis} or run the join-scripts via {join}.'))
54
		if "Joined successfully" not in stdout:
60
		raise Critical(description='\n'.join(errors))
55
			description = _('"univention-check-join-status" returned a problem with domain join.')
56
			raise Critical('\n'.join([
57
				description,
58
				"stdout: %s" % (stdout),
59
				"stderr: %s" % (stderr)
60
			]))
61
	except Critical:
62
		raise
63
	except Exception as ex:
64
		description = _('Problem with plugin check_join_status.py.')
65
		raise Critical('\n'.join([
66
			description,
67
			"Exception-Type: %s" % (ex.__class__),
68
			"Exception-Message: %s" % (ex.message)
69
		]))
70
61
71
if __name__ == '__main__':
62
if __name__ == '__main__':
72
	from univention.management.console.modules.diagnostic import main
63
	from univention.management.console.modules.diagnostic import main
73
- 
74
check_join_status (po)
64
check_join_status (po)
75
--
76
.../umc/python/diagnostic/de.po                    | 38 ++++++++++++++++++++--
65
.../umc/python/diagnostic/de.po                    | 38 ++++++++++++++++++++--
77
1 file changed, 36 insertions(+), 2 deletions(-)
66
1 file changed, 36 insertions(+), 2 deletions(-)
(-)a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/de.po (-3 / +36 lines)
 Lines 2-9    Link Here 
2
msgid ""
2
msgid ""
3
msgstr ""
3
msgstr ""
4
"Project-Id-Version: univention-management-console-module-diagnostic\n"
4
"Project-Id-Version: univention-management-console-module-diagnostic\n"
5
"Report-Msgid-Bugs-To: packages@univention.de\n"
5
"Report-Msgid-Bugs-To: \n"
6
"POT-Creation-Date: 2016-01-14 12:19+0100\n"
6
"POT-Creation-Date: 2017-05-31 18:25+0200\n"
7
"PO-Revision-Date: \n"
7
"PO-Revision-Date: \n"
8
"Last-Translator: Univention GmbH <packages@univention.de>\n"
8
"Last-Translator: Univention GmbH <packages@univention.de>\n"
9
"Language-Team: Univention GmbH <packages@univention.de>\n"
9
"Language-Team: Univention GmbH <packages@univention.de>\n"
 Lines 12-17   msgstr "" Link Here 
12
"Content-Type: text/plain; charset=UTF-8\n"
12
"Content-Type: text/plain; charset=UTF-8\n"
13
"Content-Transfer-Encoding: 8bit\n"
13
"Content-Transfer-Encoding: 8bit\n"
14
14
15
#: umc/python/diagnostic/plugins/check_join_status.py:54
16
msgid ""
17
"\"univention-check-join-status\" returned a problem with the domain join."
18
msgstr ""
19
"\"univention-check-join-status\" gab einen Fehler mit dem Domänenbeitritt "
20
"zurück."
21
15
#: umc/python/diagnostic/plugins/nameserver.py:15
22
#: umc/python/diagnostic/plugins/nameserver.py:15
16
#, python-format
23
#, python-format
17
msgid "%d of the configured nameservers are not responding to DNS queries."
24
msgid "%d of the configured nameservers are not responding to DNS queries."
 Lines 27-32   msgstr "" Link Here 
27
msgid "Adjust to suggested limits"
34
msgid "Adjust to suggested limits"
28
msgstr "An vorgeschlagene Limits anpassen"
35
msgstr "An vorgeschlagene Limits anpassen"
29
36
37
#: umc/python/diagnostic/plugins/check_join_status.py:40
38
msgid "Check join status"
39
msgstr "Überprüfe den Zustand des Domänenbeitritts"
40
30
#: umc/python/diagnostic/plugins/gateway.py:11
41
#: umc/python/diagnostic/plugins/gateway.py:11
31
msgid "Gateway is not reachable"
42
msgid "Gateway is not reachable"
32
msgstr "Gateway ist nicht erreichbar"
43
msgstr "Gateway ist nicht erreichbar"
 Lines 86-91   msgstr "" Link Here 
86
"Stellen Sie sicher, dass die Hardware des Gateway-Geräts korrekt "
97
"Stellen Sie sicher, dass die Hardware des Gateway-Geräts korrekt "
87
"funktioniert."
98
"funktioniert."
88
99
100
#: umc/python/diagnostic/plugins/check_join_status.py:45
101
msgid "Manual: Analysis of listener/notifier problems"
102
msgstr "Handbuch: Analyse von Listener/Notifier-Problemen"
103
89
#: umc/python/diagnostic/plugins/package_status.py:15
104
#: umc/python/diagnostic/plugins/package_status.py:15
90
msgid ""
105
msgid ""
91
"More information about the cause can be gained by executing \"dpkg --audit\"."
106
"More information about the cause can be gained by executing \"dpkg --audit\"."
 Lines 137-146   msgstr "SSH-Verbindung zu anderem UCS Server fehlgeschlagen!" Link Here 
137
msgid "Security limits exceeded"
152
msgid "Security limits exceeded"
138
msgstr "Sicherheitslimits überschritten"
153
msgstr "Sicherheitslimits überschritten"
139
154
155
#: umc/python/diagnostic/plugins/check_join_status.py:59
156
#, python-brace-format
157
msgid "See {erroranalysis} or run the join-scripts via {join}."
158
msgstr ""
159
"Siehe {erroranalysis} oder führen Sie ausstehende JOIN-Skripte via {join} "
160
"aus."
161
140
#: umc/python/diagnostic/__init__.py:262
162
#: umc/python/diagnostic/__init__.py:262
141
msgid "Test again"
163
msgid "Test again"
142
msgstr "Erneut testen"
164
msgstr "Erneut testen"
143
165
166
#: umc/python/diagnostic/plugins/check_join_status.py:41
167
msgid "The check for the join status was succsesful."
168
msgstr "Die Überprüfung des Domänenbeitritts war erfolgreich."
169
144
#: umc/python/diagnostic/plugins/ssh_connection.py:48
170
#: umc/python/diagnostic/plugins/ssh_connection.py:48
145
msgid ""
171
msgid ""
146
"The following list shows the affected remote servers and the reason for the "
172
"The following list shows the affected remote servers and the reason for the "
 Lines 260-265   msgstr "" Link Here 
260
"dass Authentifikations-Zugangsdaten (falls existierend) korrekt sind und die "
286
"dass Authentifikations-Zugangsdaten (falls existierend) korrekt sind und die "
261
"ACL's des Proxy-Servers nicht verbieten, Anfragen an %s zu stellen."
287
"ACL's des Proxy-Servers nicht verbieten, Anfragen an %s zu stellen."
262
288
289
#: umc/python/diagnostic/plugins/check_join_status.py:44
290
msgid ""
291
"http://docs.software-univention.de/manual.html#domain:listenernotifier:"
292
"erroranalysis"
293
msgstr ""
294
"http://docs.software-univention.de/handbuch.html#domain:listenernotifier:"
295
"erroranalysis"
296
263
#: umc/python/diagnostic/plugins/package_status.py:28
297
#: umc/python/diagnostic/plugins/package_status.py:28
264
msgid "some"
298
msgid "some"
265
msgstr "einigen"
299
msgstr "einigen"
266
- 

Return to bug 35860