<div dir="ltr">Cole<div> Thanks for the response. I will try with --test-first-run option to see how it pans out.</div><div><br></div><div>Cheers</div><div>-Avaneendra</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 17, 2015 at 1:54 PM, Cole Robinson <span dir="ltr"><<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 11/17/2015 01:47 PM, Avaneendra Alugupalli wrote:<br>
> Cole<br>
>  Thanks for your time. Will try to ask again. Sorry for my bad english :).<br>
> Will try my best<br>
> this time.<br>
><br>
> I downloaded the code and tried to run the virt-manager.py of off eclipse<br>
> Pydev IDE.<br>
> Ran into some issues, not sure the order but ran<br>
> glib-compile-schemas data/*schamas*<br>
> ran "python setup.py -install"<br>
><br>
> after that virt-manager sucessfully came up "with auto connected to lxc:///<br>
> and qemu://system"<br>
</span>> *<br>
> *<br>
<span class="">> Now I wanted to understand the code, ran the virt-manager in pdb -debugger.<br>
> stepping into the config code found that the<br>
> "/org/virt-manager/virt-manager/connections/uris"<br>
> is already populated with " lxc:/// and qemu://system" value.<br>
><br>
> but I see that this tuple in dconf DB is only updated by engine code. now<br>
> wondering how<br>
> does config is able to see the " lxc:/// and qemu://system" values.<br>
><br>
<br>
</span>If this was your first time running virt-manager, there is some first-run code<br>
to try and determine a default connection, see engine.py:_add_default_conn as<br>
a starting point.<br>
<br>
That said, I don't know what could have caused the app to start up with both<br>
qemu:///system _and_ lxc:/// in the connection list, it should only be one or<br>
the other (or none, or an error message). You sure you definitely haven't run<br>
virt-manager before?<br>
<br>
FWIW you can test the first-run behavior again by using virt-manager --debug<br>
--test-first-run, if you're just trying to figure out how it works<br>
<span class="HOEnZb"><font color="#888888"><br>
- Cole<br>
</font></span><span class="im HOEnZb"><br>
><br>
> On Tue, Nov 17, 2015 at 1:37 PM, Cole Robinson <<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a><br>
</span><span class="im HOEnZb">> <mailto:<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a>>> wrote:<br>
><br>
>     On 11/17/2015 11:40 AM, Avaneendra Alugupalli wrote:<br>
>     > hi Cole<br>
>     >  Thanks for the response.<br>
>     >><br>
>     ><br>
>     >>The functions that add/remove/list the URIs in config.py are add_conn,<br>
>     >> remove_conn, list_conn_uris respectively. They are called from engine.py<br>
>     ><br>
>     > From the code in virt-manager.py main handler, I find that the<br>
>     > config object is getting created before the engine object?. Is that for the first<br>
>     > time when I run the virt-manager app. config sees default values of connections/<br>
>     > uris to none [] and then engine creates them. And even if the app is exited<br>
>     > we still have non default values ("qemu:///sysmtem" and "lxc://") in the dconf?.<br>
>     > perhaps not delete those values from dconf?.<br>
>     ><br>
><br>
>     Sorry, I'm not really following what you are saying. Can you describe the<br>
>     problem you are hitting, step by step, and exactly what you are trying to<br>
>     determine?<br>
><br>
>     Also, take a look at dconf-editor, it's a UI tool for exploring dconf values.<br>
>     Might explain what you are seeing.<br>
><br>
>     - Cole<br>
><br>
>     ><br>
>     > On Mon, Nov 16, 2015 at 8:09 PM, Cole Robinson <<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a> <mailto:<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a>><br>
</span><div class="HOEnZb"><div class="h5">>     > <mailto:<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a> <mailto:<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a>>>> wrote:<br>
>     ><br>
>     >     On 11/16/2015 02:17 PM, Avaneendra Alugupalli wrote:<br>
>     >     > hi<br>
>     >     >  I am trying to understand the code for virt-manager and found<br>
>     that during the<br>
>     >     > config object create, gets the connections / uris using the<br>
>     Gsettings API. and<br>
>     >     > these are the entries in dconf database.<br>
>     >     ><br>
>     >     > forchild inself._settings.list_children():<br>
>     >     > childschema =self._root +"."+child<br>
>     >     > self._settingsmap[child] =Gio.Settings.new(childschema)<br>
>     >     ><br>
>     >     ><br>
>     >     > returns connections/uris as "qemu:///system" and "lxc:///". From the<br>
>     >     ><br>
>     >     > I can see that data<br>
>     >     ><br>
>     ><br>
>      <<a href="https://github.com/virt-manager/virt-manager/tree/master/data" rel="noreferrer" target="_blank">https://github.com/virt-manager/virt-manager/tree/master/data</a>>/org.virt-manager.virt-manager.gschema.xml<br>
>     >     > makes<br>
>     >     > default entry for these fields. How ever am unable to track who is<br>
>     updating<br>
>     >     > the connections/uris to "qemu:///system" and "lxc:///" strings.<br>
>     ><br>
>     >     The functions that add/remove/list the URIs in config.py are add_conn,<br>
>     >     remove_conn, list_conn_uris respectively. They are called from engine.py<br>
>     ><br>
>     >     > Also is there any architecture/ design document to understand the<br>
>     code at very<br>
>     >     > higher<br>
>     >     > level?.<br>
>     ><br>
>     >     No unfortunately :/<br>
>     ><br>
>     >     - Cole<br>
>     ><br>
>     ><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>