[bitbake-devel] Fwd: [Toaster] Build cancellation from toaster

sujith h sujith.h at gmail.com
Thu Jan 21 15:16:29 UTC 2016


Hi,

After discussion with toaster community, it was decided to ask it over
bitbake-devel list. So I am sharing the issue, which I am blocked with.

Let me share the issue which I am facing: build triggered from command line
were not able to cancel from toaster, where as the build triggered from
toaster were able to cancel from toaster successfully.

The logic that I am using to cancel build from toaster is to pass
stateForceShutdown command ( as in
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=sujith/toaster-build-cancel12&id=6601df1a06abc3ce3290656e1f2f91a511653c0d).
This works like charm when the build is triggered from toaster. But when I
use the same logic to cancel the build triggered from command line I can
see error:
---------------------------
ProtocolError: <ProtocolError for 0.0.0.0:42952/: 503 Service Unavailable>

Not able to understand why it is not able to connect to the port. Because
as per my understanding when a build is triggered from toaster, we connect
to the host:port and execute the commands. The runcommand is failing badly
with the log:

2016-01-18 16:06:05,608 ERROR Internal Server Error:
/toastergui/project/1/builds/
Traceback (most recent call last):
  File
"/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/core/handlers/base.py",
line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py",
line 171, in returned_wrapper
    context = view(request, *args, **kwargs)
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py",
line 2896, in projectbuilds
    bbctrl.forceShutDown()
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py",
line 73, in forceShutDown
    return self._runCommand(["stateForceShutdown"])
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py",
line 50, in _runCommand
    result, error = self.connection.runCommand(command)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1240, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1328, in single_request
    response.msg,
ProtocolError: <ProtocolError for 0.0.0.0:42952/: 503 Service Unavailable>
Internal Server Error: /toastergui/project/1/builds/
Traceback (most recent call last):
  File
"/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/core/handlers/base.py",
line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py",
line 171, in returned_wrapper
    context = view(request, *args, **kwargs)
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py",
line 2896, in projectbuilds
    bbctrl.forceShutDown()
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py",
line 73, in forceShutDown
    return self._runCommand(["stateForceShutdown"])
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py",
line 50, in _runCommand
    result, error = self.connection.runCommand(command)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1240, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1328, in single_request
    response.msg,
ProtocolError: <ProtocolError for 0.0.0.0:42952/: 503 Service Unavailable>
[18/Jan/2016 16:06:05] "POST /toastergui/project/1/builds/ HTTP/1.1" 500
13414
-------------------------

As far as I understand the connection to bitbake server is failing.
Any helping hand or pointers to tackle this issue would be helpful for me
to move ahead with this task.

Thanks,
Sujith H


---------- Forwarded message ----------
From: sujith h <sujith.h at gmail.com>
Date: Mon, Jan 18, 2016 at 9:42 PM
Subject: Re: [Toaster] Build cancellation from toaster
To: "Barros Pena, Belen" <belen.barros.pena at intel.com>
Cc: "toaster at yoctoproject.org" <toaster at yoctoproject.org>




On Mon, Jan 18, 2016 at 1:13 AM, Barros Pena, Belen <
belen.barros.pena at intel.com> wrote:

>
>
> On 13/01/2016 16:47, "sujith h" <sujith.h at gmail.com> wrote:
>
> >
> >I have updated another patch set with which I have verified with:
> >
> >a) cancellation of a normal build
> >
> >b) run again and cancel the build
> >
> >c) stop toaster + start toaster + run again   and cancel the build
> >
> >
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sujith/toast
> >er-build-cancel12
>
> Sorry for the delay in looking into this. Cancellation seems to be working
> well for me for any builds I start from Toaster. However, it doesn't seem
> to work for builds I start from the command line and I track through
> Toaster. For those builds, a 'cancel' button appears, but when I click it,
> nothing happens: the build proceeds until it completes.
>
> I am not even sure if the 'cancel' functionality can work for builds
> started from the command line, although it would be great if it did. If it
> is not possible to make it work, then the cancel button should not display
> for those builds. We can provide a message instead, as we do in the case
> of the 'run again' button, explaining that builds started from the command
> line can only be cancelled from the command line.
>

Somehow when i try to use the same logic to cancel the build triggered from
command line ( with small modification in the code though), I am getting
error in the toaster_web.log as:

ProtocolError: <ProtocolError for 0.0.0.0:42952/: 503 Service Unavailable>

Not able to understand why it is not able to connect to the port. Because
as per my understanding when a build is triggered from toaster, we connect
to the host:port and execute the commands. The runcommand is failing badly
with the log:

2016-01-18 16:06:05,608 ERROR Internal Server Error:
/toastergui/project/1/builds/
Traceback (most recent call last):
  File
"/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/core/handlers/base.py",
line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py",
line 171, in returned_wrapper
    context = view(request, *args, **kwargs)
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py",
line 2896, in projectbuilds
    bbctrl.forceShutDown()
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py",
line 73, in forceShutDown
    return self._runCommand(["stateForceShutdown"])
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py",
line 50, in _runCommand
    result, error = self.connection.runCommand(command)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1240, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1328, in single_request
    response.msg,
ProtocolError: <ProtocolError for 0.0.0.0:42952/: 503 Service Unavailable>
Internal Server Error: /toastergui/project/1/builds/
Traceback (most recent call last):
  File
"/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/core/handlers/base.py",
line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py",
line 171, in returned_wrapper
    context = view(request, *args, **kwargs)
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py",
line 2896, in projectbuilds
    bbctrl.forceShutDown()
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py",
line 73, in forceShutDown
    return self._runCommand(["stateForceShutdown"])
  File
"/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py",
line 50, in _runCommand
    result, error = self.connection.runCommand(command)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1240, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1328, in single_request
    response.msg,
ProtocolError: <ProtocolError for 0.0.0.0:42952/: 503 Service Unavailable>
[18/Jan/2016 16:06:05] "POST /toastergui/project/1/builds/ HTTP/1.1" 500
13414


Any helping hand would be appreciated. More over I would also like to know
if we can pass commands to builds triggered from command line?

Thanks,
Sujith H

-- 
സുജിത് ഹരിദാസന്
Bangalore
<Project>Contributor to KDE project
http://fci.wikia.com/wiki/Anti-DRM-Campaign
<Blog> http://sujithh.info



-- 
സുജിത് ഹരിദാസന്
Bangalore
<Project>Contributor to KDE project
http://fci.wikia.com/wiki/Anti-DRM-Campaign
<Blog> http://sujithh.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20160121/e37dbcd3/attachment-0002.html>


More information about the bitbake-devel mailing list