Service failed to restart after signal hook
peakwinter opened this issue · comments
(Note that this bug should not result in a crash, rather the user should be prompted with a simple error message that the operation could not be completed.)
arkOS 0.8.3 Crash Report
Running in prod
System: Linux arkos 4.4.47-1-ARCH #1 SMP Mon Feb 6 18:48:50 MST 2017 armv7l GNU/Linux
Platform: armv7l Unknown
Python version 3.6.0
Config path: settings.json
Loaded applicatons:
basicsite
paperwork
haste
syncthing
wallabag
fs-samba
db-mariadb
db-sqlite3
wordpress
radicale
grav
xmpp
nextcloud
mailpile
lychee
Request: POST /api/system/domains
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/lib/python3.6/site-packages/flask/views.py", line 84, in view
return self.dispatch_request(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/flask/views.py", line 149, in dispatch_request
return meth(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/kraken/auth.py", line 135, in decorator
return func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/kraken/frameworks/roles.py", line 139, in post
d.add()
File "/usr/lib/python3.6/site-packages/arkos/system/domains.py", line 54, in add
signals.emit("domains", "post_add", self)
File "/usr/lib/python3.6/site-packages/arkos/signals.py", line 87, in emit
x.trigger(data, crit)
File "/usr/lib/python3.6/site-packages/arkos/signals.py", line 47, in trigger
self.func(data)
File "/var/lib/arkos/applications/xmpp/backend.py", line 54, in add_domain
services.get("prosody").restart()
File "/usr/lib/python3.6/site-packages/arkos/system/services.py", line 176, in restart
"sudo arkosctl svc status {0}
".format(self.name))
arkos.system.services.ActionError: ('svc', 'The service failed to restart. Please check sudo arkosctl svc status prosody
')