Bug 10731

Summary: bitbake --observe-only doesn't work with memres
Product: [Build System, Metadata & Runtime] BitBake Reporter: Paul Eggleton <bluelightning>
Component: bitbakeAssignee: Pavel Zhukov <pavel>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium+ CC: liezhi.yang, pavel, poky.bs.watcher, poky.watcher, randy.macleod, richard.purdie
Version: 2.2   
Target Milestone: 6.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on:    
Bug Blocks: 13023    

Description Paul Eggleton 2016-11-27 20:41:22 UTC
bitbake --observe-only is supposed to capture and display events sent by the server, but it doesn't seem to be working. If I start it before running bitbake to build something, it exits when the build starts with the following error:

----------- snip -----------
$ BBSERVER=localhost:-1 bitbake --observe-only
Traceback (most recent call last):
  File "/home/paul/poky/poky/bitbake/bin/bitbake", line 48, in <module>
    cookerdata.CookerConfiguration()))
  File "/home/paul/poky/poky/bitbake/lib/bb/main.py", line 511, in bitbake_main
    configParams)
  File "/home/paul/poky/poky/bitbake/lib/bb/ui/knotty.py", line 343, in main
    includelogs, loglines, consolelogfile = _log_settings_from_server(server)
  File "/home/paul/poky/poky/bitbake/lib/bb/ui/knotty.py", line 328, in _log_settings_from_server
    raise BaseException(error)
BaseException: Not able to execute not readonly commands in readonly mode
----------- snip -----------

If I instead run it after I start the bitbake build, it times out:

----------- snip -----------
$ BBSERVER=localhost:-1 bitbake --observe-only
Traceback (most recent call last):
  File "/home/paul/poky/poky/bitbake/bin/bitbake", line 48, in <module>
    cookerdata.CookerConfiguration()))
  File "/home/paul/poky/poky/bitbake/lib/bb/main.py", line 496, in bitbake_main
    server_connection.setupEventQueue()
  File "/home/paul/poky/poky/bitbake/lib/bb/server/xmlrpc.py", line 337, in setupEventQueue
    self.events = uievent.BBUIEventQueue(self.connection, self.clientinfo)
  File "/home/paul/poky/poky/bitbake/lib/bb/ui/uievent.py", line 72, in __init__
    raise Exception(errmsg)
Exception: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 34833
WARNING: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 34833, retry
WARNING: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 34833, retry
WARNING: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 34833, retry
WARNING: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 34833, retry
WARNING: Could not register UI event handler. Error: Cooker is busy: running, host 127.0.0.1, port 34833, retry
----------- snip -----------
Comment 1 Paul Eggleton 2017-06-06 11:09:08 UTC
We really need to add a test for --observe-only at the same time.
Comment 2 Paul Eggleton 2017-06-15 08:40:26 UTC
The first issue (starting the --observe-only instance first) appears to be solved in master at least, but the second is still present. It would be nice if there was a way to keep it alive so that you can continuously watch the server.
Comment 3 Robert Yang 2017-07-11 03:20:48 UTC
Hi Paul,

I'd like to work on it if you are fine with that.
Comment 4 Paul Eggleton 2017-07-11 07:21:53 UTC
Certainly, thanks Robert!
Comment 5 Robert Yang 2017-09-05 01:12:59 UTC
The bitbake --observer doesn't work atm, we need go on working on it in 2.5
Comment 6 Randy MacLeod 2022-11-01 19:53:08 UTC
Medium+ bugs should use an M* milestone so pick M2.
Comment 7 Randy MacLeod 2024-10-31 15:09:25 UTC
Bulk move of 5.1 bugs to 5.2. -- YP bug review (Randy)