<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&amp;id=6601df1a06abc3ce3290656e1f2f91a511653c0d">http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=sujith/toaster-build-cancel12&amp;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: &lt;ProtocolError for <a href="http://0.0.0.0:42952/" target="_blank">0.0.0.0:42952/</a>: 503 Service Unavailable&gt;<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 &quot;/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/core/handlers/base.py&quot;, line 132, in get_response<br>    response = wrapped_callback(request, *callback_args, **callback_kwargs)<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py&quot;, line 171, in returned_wrapper<br>    context = view(request, *args, **kwargs)<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py&quot;, line 2896, in projectbuilds<br>    bbctrl.forceShutDown()<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py&quot;, line 73, in forceShutDown<br>    return self._runCommand([&quot;stateForceShutdown&quot;])<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py&quot;, line 50, in _runCommand<br>    result, error = self.connection.runCommand(command)<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1240, in __call__<br>    return self.__send(self.__name, args)<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1599, in __request<br>    verbose=self.__verbose<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1280, in request<br>    return self.single_request(host, handler, request_body, verbose)<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1328, in single_request<br>    response.msg,<br>ProtocolError: &lt;ProtocolError for <a href="http://0.0.0.0:42952/" target="_blank">0.0.0.0:42952/</a>: 503 Service Unavailable&gt;<br>Internal Server Error: /toastergui/project/1/builds/<span class=""><br>Traceback (most recent call last):<br></span>  File &quot;/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/core/handlers/base.py&quot;, line 132, in get_response<br>    response = wrapped_callback(request, *callback_args, **callback_kwargs)<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py&quot;, line 171, in returned_wrapper<br>    context = view(request, *args, **kwargs)<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py&quot;, line 2896, in projectbuilds<br>    bbctrl.forceShutDown()<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py&quot;, line 73, in forceShutDown<br>    return self._runCommand([&quot;stateForceShutdown&quot;])<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py&quot;, line 50, in _runCommand<br>    result, error = self.connection.runCommand(command)<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1240, in __call__<br>    return self.__send(self.__name, args)<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1599, in __request<br>    verbose=self.__verbose<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1280, in request<br>    return self.single_request(host, handler, request_body, verbose)<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1328, in single_request<br>    response.msg,<br>ProtocolError: &lt;ProtocolError for <a href="http://0.0.0.0:42952/" target="_blank">0.0.0.0:42952/</a>: 503 Service Unavailable&gt;<br>[18/Jan/2016 16:06:05] &quot;POST /toastergui/project/1/builds/ HTTP/1.1&quot; 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">&lt;<a href="mailto:sujith.h@gmail.com">sujith.h@gmail.com</a>&gt;</span><br>Date: Mon, Jan 18, 2016 at 9:42 PM<br>Subject: Re: [Toaster] Build cancellation from toaster<br>To: &quot;Barros Pena, Belen&quot; &lt;<a href="mailto:belen.barros.pena@intel.com">belen.barros.pena@intel.com</a>&gt;<br>Cc: &quot;<a href="mailto:toaster@yoctoproject.org">toaster@yoctoproject.org</a>&quot; &lt;<a href="mailto:toaster@yoctoproject.org">toaster@yoctoproject.org</a>&gt;<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">&lt;<a href="mailto:belen.barros.pena@intel.com" target="_blank">belen.barros.pena@intel.com</a>&gt;</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, &quot;sujith h&quot; &lt;<a href="mailto:sujith.h@gmail.com" target="_blank">sujith.h@gmail.com</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt;I have updated another patch set with which I have verified with:<br>
&gt;<br>
&gt;a) cancellation of a normal build<br>
&gt;<br>
&gt;b) run again and cancel the build<br>
&gt;<br>
&gt;c) stop toaster + start toaster + run again   and cancel the build<br>
&gt;<br>
&gt;<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>
&gt;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&#39;t seem<br>
to work for builds I start from the command line and I track through<br>
Toaster. For those builds, a &#39;cancel&#39; 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 &#39;cancel&#39; 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 &#39;run again&#39; 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: &lt;ProtocolError for <a href="http://0.0.0.0:42952/" target="_blank">0.0.0.0:42952/</a>: 503 Service Unavailable&gt;<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 &quot;/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/core/handlers/base.py&quot;, line 132, in get_response<br>    response = wrapped_callback(request, *callback_args, **callback_kwargs)<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py&quot;, line 171, in returned_wrapper<br>    context = view(request, *args, **kwargs)<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py&quot;, line 2896, in projectbuilds<br>    bbctrl.forceShutDown()<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py&quot;, line 73, in forceShutDown<br>    return self._runCommand([&quot;stateForceShutdown&quot;])<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py&quot;, line 50, in _runCommand<br>    result, error = self.connection.runCommand(command)<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1240, in __call__<br>    return self.__send(self.__name, args)<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1599, in __request<br>    verbose=self.__verbose<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1280, in request<br>    return self.single_request(host, handler, request_body, verbose)<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1328, in single_request<br>    response.msg,<br>ProtocolError: &lt;ProtocolError for <a href="http://0.0.0.0:42952/" target="_blank">0.0.0.0:42952/</a>: 503 Service Unavailable&gt;<br>Internal Server Error: /toastergui/project/1/builds/<span class=""><br>Traceback (most recent call last):<br></span>  File &quot;/home/sujith/build/poky-push/venv/lib/python2.7/site-packages/django/core/handlers/base.py&quot;, line 132, in get_response<br>    response = wrapped_callback(request, *callback_args, **callback_kwargs)<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py&quot;, line 171, in returned_wrapper<br>    context = view(request, *args, **kwargs)<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/toastergui/views.py&quot;, line 2896, in projectbuilds<br>    bbctrl.forceShutDown()<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py&quot;, line 73, in forceShutDown<br>    return self._runCommand([&quot;stateForceShutdown&quot;])<br>  File &quot;/home/sujith/build/poky-push/bitbake/lib/toaster/bldcontrol/bbcontroller.py&quot;, line 50, in _runCommand<br>    result, error = self.connection.runCommand(command)<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1240, in __call__<br>    return self.__send(self.__name, args)<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1599, in __request<br>    verbose=self.__verbose<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1280, in request<br>    return self.single_request(host, handler, request_body, verbose)<br>  File &quot;/usr/lib64/python2.7/xmlrpclib.py&quot;, line 1328, in single_request<br>    response.msg,<br>ProtocolError: &lt;ProtocolError for <a href="http://0.0.0.0:42952/" target="_blank">0.0.0.0:42952/</a>: 503 Service Unavailable&gt;<br>[18/Jan/2016 16:06:05] &quot;POST /toastergui/project/1/builds/ HTTP/1.1&quot; 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>&lt;Project&gt;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>&lt;Blog&gt; <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>&lt;Project&gt;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>&lt;Blog&gt; <a href="http://sujithh.info" target="_blank">http://sujithh.info</a><br></div>
</div></div></div>