diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-02-10 16:25:17 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-17 14:38:31 +0000 |
commit | a07cf2e50c376ce1fdcc9ac77e291595489de3ce (patch) | |
tree | d055b0b0e7f356347fb74b60e0593e32e6099f53 /bitbake/lib/toaster/bldcontrol/management | |
parent | d8d0db1701b4ccc0668041f84813c2e4ca57bee9 (diff) | |
download | poky-a07cf2e50c376ce1fdcc9ac77e291595489de3ce.tar.gz |
bitbake: toaster: properly detect failed server start
This patch brings in reading the server log if the server
fails to start. This is the first step in displaying the errors
in a manner that is actionable by the user.
[YOCTO #7285]
(Bitbake rev: 7f47b67bccff55673a827dbcccc767af4459c933)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/management')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index c4ab87bdc9..3de582cc86 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | |||
@@ -78,10 +78,16 @@ class Command(NoArgsCommand): | |||
78 | except Exception as e: | 78 | except Exception as e: |
79 | logger.error("runbuilds: Error executing shell command %s" % e) | 79 | logger.error("runbuilds: Error executing shell command %s" % e) |
80 | traceback.print_exc(e) | 80 | traceback.print_exc(e) |
81 | if "[Errno 111] Connection refused" in str(e): | ||
82 | # Connection refused, read toaster_server.out | ||
83 | errmsg = bec.readServerLogFile() | ||
84 | else: | ||
85 | errmsg = str(e) | ||
86 | |||
81 | BRError.objects.create(req = br, | 87 | BRError.objects.create(req = br, |
82 | errtype = str(type(e)), | 88 | errtype = str(type(e)), |
83 | errmsg = str(e), | 89 | errmsg = errmsg, |
84 | traceback = traceback.format_exc(e)) | 90 | traceback = traceback.format_exc(e)) |
85 | br.state = BuildRequest.REQ_FAILED | 91 | br.state = BuildRequest.REQ_FAILED |
86 | br.save() | 92 | br.save() |
87 | bec.be.lock = BuildEnvironment.LOCK_FREE | 93 | bec.be.lock = BuildEnvironment.LOCK_FREE |