diff options
| -rw-r--r-- | bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 5 | ||||
| -rw-r--r-- | bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index 005c464314..4814b84afd 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | |||
| @@ -108,7 +108,7 @@ class LocalhostBEController(BuildEnvironmentController): | |||
| 108 | logger.debug("localhostbecontroller: running the listener at %s" % own_bitbake) | 108 | logger.debug("localhostbecontroller: running the listener at %s" % own_bitbake) |
| 109 | 109 | ||
| 110 | 110 | ||
| 111 | cmd = "bash -c \"source %s/oe-init-build-env %s && bitbake --read conf/toaster-pre.conf --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0 && DATABASE_URL=%s BBSERVER=0.0.0.0:-1 daemon -d -i -D %s -o toaster_ui.log -- %s --observe-only -u toasterui &\"" % (self.pokydirname, self.be.builddir, | 111 | cmd = "bash -c \"source %s/oe-init-build-env %s && bitbake --read conf/toaster-pre.conf --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0 >toaster_server.log && DATABASE_URL=%s BBSERVER=0.0.0.0:-1 daemon -d -i -D %s -o toaster_ui.log -- %s --observe-only -u toasterui &\"" % (self.pokydirname, self.be.builddir, |
| 112 | self.dburl, self.be.builddir, own_bitbake) | 112 | self.dburl, self.be.builddir, own_bitbake) |
| 113 | port = "-1" | 113 | port = "-1" |
| 114 | cmdoutput = self._shellcmd(cmd) | 114 | cmdoutput = self._shellcmd(cmd) |
| @@ -290,6 +290,9 @@ class LocalhostBEController(BuildEnvironmentController): | |||
| 290 | self.islayerset = True | 290 | self.islayerset = True |
| 291 | return True | 291 | return True |
| 292 | 292 | ||
| 293 | def readServerLogFile(self): | ||
| 294 | return open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read() | ||
| 295 | |||
| 293 | def release(self): | 296 | def release(self): |
| 294 | assert self.be.sourcedir and os.path.exists(self.be.builddir) | 297 | assert self.be.sourcedir and os.path.exists(self.be.builddir) |
| 295 | import shutil | 298 | import shutil |
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 |
