Re: Funcweb Async and layout Changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, thanks for testing it :)
>
> I just pulled down the latest "makkalot_newlayout" branch and tried this
> out.   It's very very nice, good work!
>
> I noticed that when I did not have funcd running and click on a minion,
> instead of detecting the error, it tries to show each part of the error
> message as a seperate method.  You can test this by stopping funcd and
> trying to click on that minion.    This should be pretty easy to fix.
>

I think to add a global error handling to funcweb so that kind of errors wont 
be problem anymore.

> Some of the things I would change are very simple string related things:
> -- "Methods" at the top should be "Minions"
> --  "localhost.localdoman.echo.run_float" could just be "run_float"
>
++
> I think after this we should proably try to figure out how to make the
> result formatting look a bit less like Python for users, and we also
> still need to instrument the other modules so they show up in the web
> user interface.

Probably firstly will instrument the remaining methods to see what kind of 
outputs we have. Therefore i can make some generalization about output 
formatting.

>
> One question I had is when I log in and click on a method, it's always
> going to target all of the minions in the glob, right?   Do you think
> there might be some way we could also put checks by each minion we want
> to reach using a checkbox, or possibly interface with the "groups"
> support in Func?    It might be nice to have a tab in FuncWeb that would
> allow adding systems to groups, possibly.

System groups idea is interesting but dont think we need some some checkbox 
thing,because we already have the glob button so may control exactly which 
minion you want to use.

>
> I saw the new "async results" tab, but when I click on it, I get a
> rather long traceback.    Is everything using async with polling now or
> is it non-async?    I have included the traceback below.    Let me know
> what you think and how to specify in the WebUI that something should be
> async.  I think it is probably reasonable for all things to be async,
> really, and just poll for them -- though wasn't sure what you were
> doing.   This also ought to be rather easy to fix.
>
Yep i use async calls for all commands we have, except 
list_minions,list_methods and others of course 
That is what im doing :
	-send the async call
	-wait 3 sec
	- poll for result 
		if ---> status of job is FINISHED show the result immediately 
		else --> you will be notified when have some result for that command (poll 
here again)

To test the current async notification you can try the service.get_running or 
get_enabled methods they have some time to complete .

> So, other than the traceback below and the error I get when clicking on
> a minion that is not running, things look pretty good.  I think I'm
> interested in seeing what the async results would look like, as well as
> getting the output formatting printed in a way that would make
> non-Python developers have an easier time reading it, but looks good.
>
> Comments?  Thoughts?
>
> Everyone else on this list, I would definitely appreciate your feedback
> also as this is a tool intended for you too :)
>
> Thanks!
>
> --Michael
>
> Here is the traceback I got when clicking on async_results, probably
> because I didn't have any async tasks (as I didn't know how to launch
> one in the GUI):
>
> Page handler: <bound method Funcweb.display_async_results of
> <funcweb.controllers.Funcweb object at 0x9d8324c>> Traceback (most recent
> call last):
>   File
> "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttp
>tools.py", line 121, in _run self.main()
>   File
> "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttp
>tools.py", line 264, in main body = page_handler(*virtual_path,
> **self.params)
>   File "<string>", line 3, in display_async_results
>   File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line
> 365, in expose *args, **kw)
>   File "<string>", line 5, in run_with_transaction
>   File "/usr/lib/python2.5/site-packages/turbogears/database.py", line 356,
> in so_rwt retval = func(*args, **kw)
>   File "<string>", line 5, in _expose
>   File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line
> 380, in <lambda> mapping, fragment, args, kw)))
>   File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line
> 421, in _execute_func return _process_output(output, template, format,
> content_type, mapping, fragment) File
> "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 87, in
> _process_output fragment=fragment)
>   File "/usr/lib/python2.5/site-packages/turbogears/view/base.py", line
> 129, in render return engine.render(**kw)
>   File "/usr/lib/python2.5/site-packages/genshi/template/plugin.py", line
> 104, in render return self.transform(info, template).render(**kwargs)
>   File "/usr/lib/python2.5/site-packages/genshi/core.py", line 154, in
> render return encode(generator, method=method, encoding=encoding)
>   File "/usr/lib/python2.5/site-packages/genshi/output.py", line 45, in
> encode output = u''.join(list(iterator))
>   File "/usr/lib/python2.5/site-packages/genshi/output.py", line 369, in
> __call__ for kind, data, pos in stream:
>   File "/usr/lib/python2.5/site-packages/genshi/output.py", line 618, in
> __call__ for kind, data, pos in stream:
>   File "/usr/lib/python2.5/site-packages/genshi/output.py", line 679, in
> __call__ for kind, data, pos in chain(stream, [(None, None, None)]):
>   File "/usr/lib/python2.5/site-packages/genshi/output.py", line 459, in
> __call__ for ev in stream:
>   File "/usr/lib/python2.5/site-packages/genshi/core.py", line 212, in
> _ensure for event in stream:
>   File "/usr/lib/python2.5/site-packages/genshi/template/markup.py", line
> 252, in _include for event in stream:
>   File "/usr/lib/python2.5/site-packages/genshi/template/markup.py", line
> 322, in _match content = list(self._include(content, ctxt))
>   File "/usr/lib/python2.5/site-packages/genshi/template/markup.py", line
> 252, in _include for event in stream:
>   File "/usr/lib/python2.5/site-packages/genshi/template/markup.py", line
> 297, in _match for event in stream:
>   File "/usr/lib/python2.5/site-packages/genshi/template/markup.py", line
> 286, in _strip event = stream.next()
>   File "/usr/lib/python2.5/site-packages/genshi/template/markup.py", line
> 242, in _exec for event in stream:
>   File "/usr/lib/python2.5/site-packages/genshi/template/base.py", line
> 421, in _eval result = data.evaluate(ctxt)
>   File "/usr/lib/python2.5/site-packages/genshi/template/eval.py", line
> 136, in evaluate return eval(self.code, _globals, {'data': data})
>   File "/home/mdehaan/cg/func/funcweb/funcweb/templates/async_table.html",
> line 26, in <Expression u'job_pack[4]'> <td class="tableboxes"><p
> class="intabletext">${job_pack[4]}</p></td> File
> "/usr/lib/python2.5/site-packages/genshi/template/eval.py", line 281, in
> lookup_item return obj[key]
> IndexError: list index out of range

I didnt have any async results and couldnt reproduce that just have an empty 
table. I think the problem maybe if you have some older async results (with 
old job_ids) in your db so they can not be parsed according to new ones. 
glob-module-method-time_stamp ? Another reason maybe to have old version 
job_ids on minions. I think we should merge that new job_ids to master tree 
to not have that kind of errors if it is ok for you of course :)

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux