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

Chance Zibolski chance at osuosl.org
Thu Jul 25 22:58:49 UTC 2013


The sync_node and sync_vms methods definitely refresh the information
for nodes and VMs. Take a look:

https://github.com/osuosl/ganeti_webmgr/blob/master/ganeti_web/models.py#L1269

This iterates through all nodes calling their refresh method. As you
can see refresh simply calls _refresh(), which is this:
https://github.com/osuosl/ganeti_webmgr/blob/master/ganeti_web/models.py#L941

Where the RAPI call for the individual node's refresh happens.


The node list should not change if the node shuts down, however the
checkbox next the the node's name should change red, and the
node-detail page should as reflect this. If you aren't experiencing
the change in the status of the node's checkmark, then please send me
a screenshot of before shutting down, after shutting down, and after
refreshing, of the node list.

Thanks, hopes that clears things up.

On Thu, Jul 25, 2013 at 11:25 AM, pranjal mittal
<mittal.pranjal at gmail.com> wrote:
> 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]
>
> 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 | LinkedIn | Blog


More information about the gsoc-dev mailing list