Bug 9141

Summary: toaster when xmlrpc/cooker dies the web didn't tell the user about it
Product: [Build System, Metadata & Runtime] Toaster Reporter: Aníbal Limón <anibal.limon>
Component: toasterAssignee: Toaster default assignee <toaster>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Low CC: belen.barros.pena, david.reyna, jessica.zhang, jose.perez.carranza, stanciux.mihail
Version: 2.1   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard: GUI design pending
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Aníbal Limón 2016-02-18 22:38:39 UTC
If you try to build some incompatible layers and cause the xmlrpc/cooker dies it didn't notice toaster web ui about it.

Then you should view in the toaster_ui.log an exception about fail to connect, i.e.,

alimon@alimonb-mobl1:~/repos/yocto-autobuilder/yocto-worker/toaster-tests/build/build$ cat bitbake-cookerdaemon.log
Server (cooker) exiting
 
alimon@alimonb-mobl1:~/repos/yocto-autobuilder/yocto-worker/toaster-tests/build/build$ cat toaster_ui.log
Traceback (most recent call last):
  File "/home/alimon/repos/yocto-autobuilder/yocto-worker/toaster-tests/build/bitbake/bin/bitbake", line 45, in <module>
    cookerdata.CookerConfiguration()))
  File "/home/alimon/repos/yocto-autobuilder/yocto-worker/toaster-tests/build/bitbake/lib/bb/main.py", line 417, in bitbak_main
    server_connection.setupEventQueue()
  File "/home/alimon/repos/yocto-autobuilder/yocto-worker/toaster-tests/build/bitbake/lib/bb/server/xmlrpc.py", line 308, n setupEventQueue
    self.events = uievent.BBUIEventQueue(self.connection, self.clientinfo)
  File "/home/alimon/repos/yocto-autobuilder/yocto-worker/toaster-tests/build/bitbake/lib/bb/ui/uievent.py", line 54, in _init__
    self.EventHandle, error = self.BBServer.registerEventHandler(self.host, self.port)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1591, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1301, in single_request
    self.send_content(h, request_body)
  File "/home/alimon/repos/yocto-autobuilder/yocto-worker/toaster-tests/build/bitbake/lib/bb/server/xmlrpc.py", line 79, i send_content
    xmlrpclib.Transport.send_content(self, h, body)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1448, in send_content
    connection.endheaders(request_body)
  File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 850, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 812, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 793, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
    raise err
error: [Errno 111] Connection refused
DEBUG: Removed the following variables from the environment: VIRTUAL_ENV, TOASTER_DIR, TZ, TOASTER_CONF, SHLVL, OLDPWD, DAABASE_URL, DJANGO_SETTINGS_MODULE, PS1, BBSERVER, _, BUILDDIR
RAW Paste Data
Comment 1 Belen Barros Pena 2016-02-19 09:02:15 UTC
To work out what they UI should show, I need to be able to reproduce this. Can you give me some steps? Thanks!
Comment 2 Aníbal Limón 2016-02-19 15:33:33 UTC
(In reply to comment #1)
> To work out what they UI should show, I need to be able to reproduce this.
> Can you give me some steps? Thanks!

Hi Belen,

The way to reproduce this is a little bit complicated because is a critial error when xmlrpc bitbake dies, the overall idea is detect when xmlrpc bitbake dies and send an event to the WEB ui for show this critical error in some manner.

I'm not an expert on toaster so i think a toaster developer could give you a better description.

Best regards,
    alimon
Comment 3 Belen Barros Pena 2016-02-19 16:22:06 UTC
From Brian Avery on how to reproduce this: "run toaster. then kill the bitbake memres server (the process that has the —server xmlrpc flags) by hand with a kill command."
Comment 4 Belen Barros Pena 2016-02-19 16:23:14 UTC
(In reply to comment #3)
> From Brian Avery on how to reproduce this: "run toaster. then kill the
> bitbake memres server (the process that has the —server xmlrpc flags) by
> hand with a kill command."

ps augxww | egrep bitbake | egrep server
kill <pid>