Another issue I've noticed: if I cancel a build before it starts properly (e.g. before the banner showing the bitbake config. scrolls onto the log), the build cancels fine. But if I then try to start another build, it hangs indefinitely.
I think this is because runbuilds waits for both a free build environment and a queued build request before it starts a build. In the case of a cancelled build, when the build starts, the build environment object is locked; but when that build is cancelled, the build environment isn't unlocked. This means that build requests go to the db table but are never started. I checked whether this is the likely cause by going through the above steps and waiting for the requested build to hang; then in the db, I updated the bldcontrol_buildenvironment table with: update bldcontrol_buildenvironment set lock = 0; As soon as I did this, my hanging build request started building. So I think the solution is to unlock the build environment once a build is cancelled (see runbuilds.py, which is where the locking is originally applied). It may be that you can do this by adding the cancelling and cancelled states to the conditional on line 97. Elliot On 25 February 2016 at 18:21, Michael Wood <[email protected]> wrote: > This is the combination of Sujith's and my work on build cancel. > > Michael Wood (7): > toaster: Move xhr calls for starting and stopping builds > toaster: xhr Update the implementation of the build cancellation > request > toaster: libtoaster Update implementation of startABuild and > cancelABuild > toaster: bldcontrol models Add a cancelling state the BuildRequest > buildinfohelper: Add handler for cancelling a build > toaster: mrb_section template Add build cancel button > toaster: models Exclude the CANCELLED builds from get_number_of_builds > > Sujith H (4): > toaster: bldcontrol Add forceShutDown function to BitbakeController > toaster: update BuildEnvironmentController and BitbakeController > toaster: models Add cancelled state to build outcome > toaster: tables BuildsTable exclude cancelled builds > > bitbake/lib/bb/ui/buildinfohelper.py | 19 +++- > bitbake/lib/toaster/bldcontrol/bbcontroller.py | 29 ++---- > .../toaster/bldcontrol/localhostbecontroller.py | 6 +- > .../migrations/0002_add_cancelling_state.py | 19 ++++ > bitbake/lib/toaster/bldcontrol/models.py | 27 ++++- > .../orm/migrations/0006_add_cancelled_state.py | 19 ++++ > bitbake/lib/toaster/orm/models.py | 12 ++- > bitbake/lib/toaster/toastergui/api.py | 110 > +++++++++++++++++++++ > .../toaster/toastergui/static/js/customrecipe.js | 4 +- > .../lib/toaster/toastergui/static/js/layerBtn.js | 3 +- > .../lib/toaster/toastergui/static/js/libtoaster.js | 41 +++++--- > .../toaster/toastergui/static/js/projectpage.js | 4 +- > .../toaster/toastergui/static/js/projecttopbar.js | 6 +- > .../toaster/toastergui/static/js/recipedetails.js | 4 +- > bitbake/lib/toaster/toastergui/tables.py | 48 +-------- > bitbake/lib/toaster/toastergui/templates/base.html | 1 + > .../toaster/toastergui/templates/mrb_section.html | 102 > +++++++++++++------ > bitbake/lib/toaster/toastergui/urls.py | 5 + > 18 files changed, 327 insertions(+), 132 deletions(-) > create mode 100644 > bitbake/lib/toaster/bldcontrol/migrations/0002_add_cancelling_state.py > create mode 100644 > bitbake/lib/toaster/orm/migrations/0006_add_cancelled_state.py > create mode 100644 bitbake/lib/toaster/toastergui/api.py > > -- > 2.1.4 > > -- > _______________________________________________ > toaster mailing list > [email protected] > https://lists.yoctoproject.org/listinfo/toaster > -- Elliot Smith Software Engineer Intel Open Source Technology Centre
-- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
