mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add tip about how to fix / investigate broken services
This commit is contained in:
parent
20baa73a0f
commit
4ab3653dfb
2 changed files with 3 additions and 2 deletions
|
@ -22,17 +22,17 @@ class ServicesDiagnoser(Diagnoser):
|
||||||
if result["status"] != "running":
|
if result["status"] != "running":
|
||||||
item["status"] = "ERROR"
|
item["status"] = "ERROR"
|
||||||
item["summary"] = ("diagnosis_services_bad_status", {"service": service, "status": result["status"]})
|
item["summary"] = ("diagnosis_services_bad_status", {"service": service, "status": result["status"]})
|
||||||
|
item["details"] = [("diagnosis_services_bad_status_tip", (service,))]
|
||||||
|
|
||||||
elif result["configuration"] == "broken":
|
elif result["configuration"] == "broken":
|
||||||
item["status"] = "WARNING"
|
item["status"] = "WARNING"
|
||||||
item["summary"] = ("diagnosis_services_conf_broken", {"service": service})
|
item["summary"] = ("diagnosis_services_conf_broken", {"service": service})
|
||||||
|
item["details"] = [(d, tuple()) for d in result["configuration-details"]]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
item["status"] = "SUCCESS"
|
item["status"] = "SUCCESS"
|
||||||
item["summary"] = ("diagnosis_services_running", {"service": service, "status": result["status"]})
|
item["summary"] = ("diagnosis_services_running", {"service": service, "status": result["status"]})
|
||||||
|
|
||||||
if result["configuration"] == "broken":
|
|
||||||
item["details"] = [(d, tuple()) for d in result["configuration-details"]]
|
|
||||||
yield item
|
yield item
|
||||||
|
|
||||||
def main(args, env, loggers):
|
def main(args, env, loggers):
|
||||||
|
|
|
@ -176,6 +176,7 @@
|
||||||
"diagnosis_services_running": "Service {service} is running!",
|
"diagnosis_services_running": "Service {service} is running!",
|
||||||
"diagnosis_services_conf_broken": "Configuration is broken for service {service}!",
|
"diagnosis_services_conf_broken": "Configuration is broken for service {service}!",
|
||||||
"diagnosis_services_bad_status": "Service {service} is {status} :(",
|
"diagnosis_services_bad_status": "Service {service} is {status} :(",
|
||||||
|
"diagnosis_services_bad_status_tip": "You can try to restart the service, and if it doesn't work, have a look at the service logs using 'yunohost service log {0}' or through the 'Services' section of the webadmin.",
|
||||||
"diagnosis_diskusage_verylow": "Storage {mountpoint} (on device {device}) has only {free_abs_GB} GB ({free_percent}%) space remaining. You should really consider cleaning up some space.",
|
"diagnosis_diskusage_verylow": "Storage {mountpoint} (on device {device}) has only {free_abs_GB} GB ({free_percent}%) space remaining. You should really consider cleaning up some space.",
|
||||||
"diagnosis_diskusage_low": "Storage {mountpoint} (on device {device}) has only {free_abs_GB} GB ({free_percent}%) space remaining. Be careful.",
|
"diagnosis_diskusage_low": "Storage {mountpoint} (on device {device}) has only {free_abs_GB} GB ({free_percent}%) space remaining. Be careful.",
|
||||||
"diagnosis_diskusage_ok": "Storage {mountpoint} (on device {device}) still has {free_abs_GB} GB ({free_percent}%) space left!",
|
"diagnosis_diskusage_ok": "Storage {mountpoint} (on device {device}) still has {free_abs_GB} GB ({free_percent}%) space left!",
|
||||||
|
|
Loading…
Add table
Reference in a new issue