[gsoc-dev] [GSoC] [GWM] Week report and Query

pranjal mittal mittal.pranjal at gmail.com
Thu Jul 25 18:25:16 UTC 2013


Chance,

I want to add on a little more... (*there is perhaps a small subtle bug in
our refresh implementation for a cluster*)

There are multiple "Refresh" buttons within GWM.
At the moment I am particularly referring to the "Refresh" button on the
/cluster/<slug> page, which links to the
URL "/cluster/<cluster_slug>/refresh"
*
*
*It does NOT refresh most parameters of *existing nodes*, although it does
good in listing new nodes and deleting the ones which are not in gnt-node
list but are in the GWM  cache.*

I am trying to bring out the fact that something looks **missing** here.

*More details:*

Here is a look some existing lines in the *Cluster* model (models.py) that
ultimately handle the refresh (corresponding to this URL
"/cluster/<cluster_slug>/refresh")
http://pastebin.osuosl.org/2740/
Here is a reference to the line number in the repo.
[1<https://github.com/osuosl/ganeti_webmgr/blob/master/ganeti_web/models.py#L1256>
]

The way this seems to be implemented does not handle refreshing "existing"
cluster nodes.

Actually I got a hint on this when I had tried using the gwm "refresh"
practically (on the test vagrant-ganeti cluster) rather than looking at the
code straightaway->

   - I shutdown a *node, *part of the cluster of interest. (via *vagrant
   halt* <node>) [2]
   - Then I used the refresh button on that cluster.
   - I did not see any change in the Node list for that cluster. (Because I
   did not remove it as a ganeti node)


*I am not sure if everyone can replicate this issue, but logically it seems
like a small bug to me and we might want to improve the way this particular
"Refresh" is implemented.* (or...am I wrong somewhere?)
(If necessary, I can try to create a step-by-step snapshot illustration.)




[1]
https://github.com/osuosl/ganeti_webmgr/blob/master/ganeti_web/models.py#L1256

[2] I am using vagrant-ganeti, but the command shown is add good as an *ssh*+
*shutdown* on any node part of the cluster.
http://github.com/ramereth/vagrant-ganeti




On Thu, Jul 25, 2013 at 11:08 PM, Chance Zibolski <chance at osuosl.org> wrote:

> Ganeti Web Manager refreshes all data returned from
>
> http://docs.ganeti.org/ganeti/master/html/rapi.html#rapi-res-instances-instance-name-get
>
> It also grabs new data from the check_job_status method which uses
> this rapi call
> http://docs.ganeti.org/ganeti/master/html/rapi.html#rapi-res-jobs-job-id-get
>
> This is implemented on the cluster because the RAPI is on the cluster
> (master node) not the other nodes/vms.
>
> On Thu, Jul 25, 2013 at 8:12 AM, pranjal mittal
> <mittal.pranjal at gmail.com> wrote:
> >
> > Hello Everyone,
> >
> > So as "ganetiviz" [1], works as a separate app now (since Friday) , I am
> > much excited about working on enhancing it further. :)
> > I worked ahead on the enhancement, I mentioned via IRC / email, about
> > visualizing node / vm status in ganetiviz via different color.
> >
> > So here's the week's report till now -
> >
> > Added (in-code) comments / docs for Abstract graph modeling &
> manipulation
> > in ganetiviz / js / graph.js
> >
> > Additional fields were added to ganetiviz/views.py to include node / vm
> > status information in output JSON. [2]
> >
> > Instance "running" status is now indicated by a "green" color and any
> other
> > instance status is indicated by a "red" color
> >
> > Offline nodes will be shown by a "red" color.
> >
> > (In-process) Anaylizing possibilities for refreshing relevant cached
> > information (ie. sync with ganeti)
> >
> > Query:
> >
> > (1)
> > How should I initiate a refresh on a particular cluster. The url given
> ahead
> > maps to a "cluster refresh":
> > "/cluster/ganeti/refresh"
> > But I am confused about what it does when I see the views.
> >
> > It says:
> >
> >  Nodes no longer in ganeti are deleted
> >  Nodes missing from the database are added
> >
> >
> > It does not mention about the following:
> >
> >  "All the attribute values of the available nodes are refreshed (even if
> a
> > node is not deleted)"
> >
> >
> >
> > Should I look towards implementing new views that use the RAPI directly
> (and
> > if useful update the GWM cached models) or is something like this already
> > implemented?
> > (This could be an important feature for the main Cluster "Refresh"
> option in
> > itself since "Refresh" should imply a refresh of the object list
> including
> > ALL its attributes and not just the names of the objects.
> >
> >
> >
> > Additional Notes:
> >
> > [1] "ganetiviz" - App dealing with Cluster, Node, VM Visualization in GWM
> > https://github.com/pramttl/ganeti_webmgr/tree/feature/13569
> >
> > [2]
> > The interesting idea is that the returned JSON can be expanded anytime by
> > adding more fields (via views) without affecting the mapping
> functionality
> > of the current ganetiviz app.
> >
> >
> > Thanking you,
> > Kind Regards,
> > - Pranjal Mittal
> >
> >
> >
> > --
> > Pranjal Mittal
> > B.Tech.  2014
> > Indian Institute of Technology,BHU
> > Varanasi, U.P,
> > India
> >
> > Github | LinkedIn | Blog
> >
> > _______________________________________________
> > gsoc-dev mailing list
> > gsoc-dev at lists.osuosl.org
> > http://lists.osuosl.org/mailman/listinfo/gsoc-dev
> >
>



-- 
Best Regards,
Pranjal Mittal
B.Tech.  2014
Indian Institute of Technology,BHU
Varanasi, U.P,
India

Github <http://github.com/pramttl> |
LinkedIn<http://in.linkedin.com/pub/pranjal-mittal/26/660/318/>|
Blog <http://pranjalmittal.in>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/gsoc-dev/attachments/20130725/89b08863/attachment-0001.html>


More information about the gsoc-dev mailing list