<div dir="ltr">Hi,<br><div><br></div><div>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.<br></div><div><br>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.<br><br></div><div>The logic that I am using to cancel build from toaster is to pass stateForceShutdown command ( as in <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=sujith/toaster-build-cancel12&id=6601df1a06abc3ce3290656e1f2f91a511653c0d">http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=sujith/toaster-build-cancel12&id=6601df1a06abc3ce3290656e1f2f91a511653c0d</a>). 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:<br>---------------------------<br>ProtocolError: <ProtocolError for <a href="http://0.0.0.0:42952/" target="_blank">0.0.0.0:42952/</a>: 503 Service Unavailable><br><br>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:<br><br>2016-01-18 16:06:05,608 ERROR Internal Server Error: /toastergui/project/1/builds/<span class=""><br>Traceback (most recent call last):<br></span> File "/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response<br> response = wrapped_callback(request, *callback_args, **callback_kwargs)<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", line 171, in returned_wrapper<br> context = view(request, *args, **kwargs)<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", line 2896, in projectbuilds<br> bbctrl.forceShutDown()<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py", line 73, in forceShutDown<br> return self._runCommand(["stateForceShutdown"])<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py", line 50, in _runCommand<br> result, error = self.connection.runCommand(command)<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1240, in __call__<br> return self.__send(self.__name, args)<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in __request<br> verbose=self.__verbose<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in request<br> return self.single_request(host, handler, request_body, verbose)<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1328, in single_request<br> response.msg,<br>ProtocolError: <ProtocolError for <a href="http://0.0.0.0:42952/" target="_blank">0.0.0.0:42952/</a>: 503 Service Unavailable><br>Internal Server Error: /toastergui/project/1/builds/<span class=""><br>Traceback (most recent call last):<br></span> File "/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response<br> response = wrapped_callback(request, *callback_args, **callback_kwargs)<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", line 171, in returned_wrapper<br> context = view(request, *args, **kwargs)<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", line 2896, in projectbuilds<br> bbctrl.forceShutDown()<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py", line 73, in forceShutDown<br> return self._runCommand(["stateForceShutdown"])<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py", line 50, in _runCommand<br> result, error = self.connection.runCommand(command)<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1240, in __call__<br> return self.__send(self.__name, args)<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in __request<br> verbose=self.__verbose<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in request<br> return self.single_request(host, handler, request_body, verbose)<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1328, in single_request<br> response.msg,<br>ProtocolError: <ProtocolError for <a href="http://0.0.0.0:42952/" target="_blank">0.0.0.0:42952/</a>: 503 Service Unavailable><br>[18/Jan/2016 16:06:05] "POST /toastergui/project/1/builds/ HTTP/1.1" 500 13414<br>-------------------------<br></div><div><br>As far as I understand the connection to bitbake server is failing.<br>Any helping hand or pointers to tackle this issue would be helpful for me to move ahead with this task.<br></div><div><br></div><div>Thanks,<br></div><div>Sujith H<br></div><div><br><br><div><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">sujith h</b> <span dir="ltr"><<a href="mailto:sujith.h@gmail.com">sujith.h@gmail.com</a>></span><br>Date: Mon, Jan 18, 2016 at 9:42 PM<br>Subject: Re: [Toaster] Build cancellation from toaster<br>To: "Barros Pena, Belen" <<a href="mailto:belen.barros.pena@intel.com">belen.barros.pena@intel.com</a>><br>Cc: "<a href="mailto:toaster@yoctoproject.org">toaster@yoctoproject.org</a>" <<a href="mailto:toaster@yoctoproject.org">toaster@yoctoproject.org</a>><br><br><br><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Jan 18, 2016 at 1:13 AM, Barros Pena, Belen <span dir="ltr"><<a href="mailto:belen.barros.pena@intel.com" target="_blank">belen.barros.pena@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span><br>
<br>
On 13/01/2016 16:47, "sujith h" <<a href="mailto:sujith.h@gmail.com" target="_blank">sujith.h@gmail.com</a>> wrote:<br>
<br>
><br>
>I have updated another patch set with which I have verified with:<br>
><br>
>a) cancellation of a normal build<br>
><br>
>b) run again and cancel the build<br>
><br>
>c) stop toaster + start toaster + run again and cancel the build<br>
><br>
><a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sujith/toast" rel="noreferrer" target="_blank">http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sujith/toast</a><br>
>er-build-cancel12<br>
<br>
</span>Sorry for the delay in looking into this. Cancellation seems to be working<br>
well for me for any builds I start from Toaster. However, it doesn't seem<br>
to work for builds I start from the command line and I track through<br>
Toaster. For those builds, a 'cancel' button appears, but when I click it,<br>
nothing happens: the build proceeds until it completes.<br>
<br>
I am not even sure if the 'cancel' functionality can work for builds<br>
started from the command line, although it would be great if it did. If it<br>
is not possible to make it work, then the cancel button should not display<br>
for those builds. We can provide a message instead, as we do in the case<br>
of the 'run again' button, explaining that builds started from the command<br>
line can only be cancelled from the command line.<br></blockquote><div><br></div></span><div>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:<br><br>ProtocolError: <ProtocolError for <a href="http://0.0.0.0:42952/" target="_blank">0.0.0.0:42952/</a>: 503 Service Unavailable><br><br></div><div>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:<br><br>2016-01-18 16:06:05,608 ERROR Internal Server Error: /toastergui/project/1/builds/<span class=""><br>Traceback (most recent call last):<br></span> File "/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response<br> response = wrapped_callback(request, *callback_args, **callback_kwargs)<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", line 171, in returned_wrapper<br> context = view(request, *args, **kwargs)<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", line 2896, in projectbuilds<br> bbctrl.forceShutDown()<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py", line 73, in forceShutDown<br> return self._runCommand(["stateForceShutdown"])<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py", line 50, in _runCommand<br> result, error = self.connection.runCommand(command)<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1240, in __call__<br> return self.__send(self.__name, args)<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in __request<br> verbose=self.__verbose<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in request<br> return self.single_request(host, handler, request_body, verbose)<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1328, in single_request<br> response.msg,<br>ProtocolError: <ProtocolError for <a href="http://0.0.0.0:42952/" target="_blank">0.0.0.0:42952/</a>: 503 Service Unavailable><br>Internal Server Error: /toastergui/project/1/builds/<span class=""><br>Traceback (most recent call last):<br></span> File "/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response<br> response = wrapped_callback(request, *callback_args, **callback_kwargs)<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", line 171, in returned_wrapper<br> context = view(request, *args, **kwargs)<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py", line 2896, in projectbuilds<br> bbctrl.forceShutDown()<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py", line 73, in forceShutDown<br> return self._runCommand(["stateForceShutdown"])<br> File "/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py", line 50, in _runCommand<br> result, error = self.connection.runCommand(command)<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1240, in __call__<br> return self.__send(self.__name, args)<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1599, in __request<br> verbose=self.__verbose<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1280, in request<br> return self.single_request(host, handler, request_body, verbose)<br> File "/usr/lib64/python2.7/xmlrpclib.py", line 1328, in single_request<br> response.msg,<br>ProtocolError: <ProtocolError for <a href="http://0.0.0.0:42952/" target="_blank">0.0.0.0:42952/</a>: 503 Service Unavailable><br>[18/Jan/2016 16:06:05] "POST /toastergui/project/1/builds/ HTTP/1.1" 500 13414<br><br><br></div><div>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?<br><br></div><div>Thanks,<br></div><div>Sujith H<br clear="all"></div></div><span class=""><br>-- <br><div>സുജിത് ഹരിദാസന്<br>Bangalore<br><Project>Contributor to KDE project<br><a href="http://fci.wikia.com/wiki/Anti-DRM-Campaign" target="_blank">http://fci.wikia.com/wiki/Anti-DRM-Campaign</a><br><Blog> <a href="http://sujithh.info" target="_blank">http://sujithh.info</a><br></div>
</span></div></div>
</div><br><br clear="all"><br>-- <br><div class="gmail_signature">സുജിത് ഹരിദാസന്<br>Bangalore<br><Project>Contributor to KDE project<br><a href="http://fci.wikia.com/wiki/Anti-DRM-Campaign" target="_blank">http://fci.wikia.com/wiki/Anti-DRM-Campaign</a><br><Blog> <a href="http://sujithh.info" target="_blank">http://sujithh.info</a><br></div>
</div></div></div>