Vasiliy Tolstov
2013-Feb-14 13:18 UTC
using @releaseDomain to subscribe for domain destruction
Hello!. How can i use @releaseDomain from dom0 to subscribe for domain destruction? I''m try to add watch for @releaseDomain path with token equal of needed domain id. But when another domain dies, i get domain that i provide via token to xs_watch. Is that possible to get id of domain what released from xenstore? -- Vasiliy Tolstov, Clodo.ru e-mail: v.tolstov@selfip.ru jabber: vase@selfip.ru
Ian Campbell
2013-Feb-14 13:36 UTC
Re: using @releaseDomain to subscribe for domain destruction
On Thu, 2013-02-14 at 13:18 +0000, Vasiliy Tolstov wrote:> Hello!. How can i use @releaseDomain from dom0 to subscribe for domain > destruction? > I''m try to add watch for @releaseDomain path with token equal of > needed domain id. But when another domain dies, i get domain that i > provide via token to xs_watch.The token is an opaque cookie which xenstore simply echoes back at you so you can identify which of your watches is firing if you have more than one. It doesn''t have any meaning other than that.> Is that possible to get id of domain what released from xenstore?Not directly, @releaseDomain just tells you that *a* domain died, you need to check if it was the one which interested you. libxl has some infrastructure for maintaining this state and firing events on specific domain death. depending on your use case this may or may not be overkill for your application. Ian.
Vasiliy Tolstov
2013-Feb-14 13:55 UTC
Re: using @releaseDomain to subscribe for domain destruction
Thanks! But why release domain not returns domid ?=) As i understand if i want to know what domains dies i need after fired watch enumerate all domains and check its status. May be in case of special watches watch returns not provided token or something more useful? in any case thanks for answers. 2013/2/14 Ian Campbell <Ian.Campbell@citrix.com>:> On Thu, 2013-02-14 at 13:18 +0000, Vasiliy Tolstov wrote: >> Hello!. How can i use @releaseDomain from dom0 to subscribe for domain >> destruction? >> I''m try to add watch for @releaseDomain path with token equal of >> needed domain id. But when another domain dies, i get domain that i >> provide via token to xs_watch. > > The token is an opaque cookie which xenstore simply echoes back at you > so you can identify which of your watches is firing if you have more > than one. It doesn''t have any meaning other than that. > >> Is that possible to get id of domain what released from xenstore? > > Not directly, @releaseDomain just tells you that *a* domain died, you > need to check if it was the one which interested you. > > libxl has some infrastructure for maintaining this state and firing > events on specific domain death. depending on your use case this may or > may not be overkill for your application. > > Ian. > > >-- Vasiliy Tolstov, Clodo.ru e-mail: v.tolstov@selfip.ru jabber: vase@selfip.ru
Ian Campbell
2013-Feb-14 14:13 UTC
Re: using @releaseDomain to subscribe for domain destruction
Please don''t top post On Thu, 2013-02-14 at 13:55 +0000, Vasiliy Tolstov wrote:> Thanks! But why release domain not returns domid ?=)The hypervisor only has a single bit (an event channel) to signal the event to the tools, so there is no space for the domid. Sure, you could probably invent up some shared memory data structure or something, but why bother.> As i understand if i want to know what domains dies i need after fired > watch enumerate all domains and check its status.Well, if you only care about one domain you just need to check that one domain. Otherwise you should look at the libxl functionality I mentioned before. Ian.
Razvan Cojocaru
2013-Feb-14 14:19 UTC
Re: using @releaseDomain to subscribe for domain destruction
>> As i understand if i want to know what domains dies i need after fired >> watch enumerate all domains and check its status. > > Well, if you only care about one domain you just need to check that one > domain. > > Otherwise you should look at the libxl functionality I mentioned before.There''s also tools/xenpaging/xenpaging.c that can be used as an example. Cheers, Razvan Cojocaru
Vasiliy Tolstov
2013-Feb-15 10:15 UTC
Re: using @releaseDomain to subscribe for domain destruction
Thanks. Now after fired watch on @releaseDomain i''m check all domains for my own domain id and get it status. 2013/2/14 Razvan Cojocaru <rzvncj@gmail.com>:>>> As i understand if i want to know what domains dies i need after fired >>> watch enumerate all domains and check its status. >> >> >> Well, if you only care about one domain you just need to check that one >> domain. >> >> Otherwise you should look at the libxl functionality I mentioned before. > > > There''s also tools/xenpaging/xenpaging.c that can be used as an example. > > Cheers, > Razvan Cojocaru > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel-- Vasiliy Tolstov, Clodo.ru e-mail: v.tolstov@selfip.ru jabber: vase@selfip.ru