Dan Smith
2005-Sep-28 15:35 UTC
[Xen-devel] [PATCH] Fix stale-state issue with ''xm dom{id,name}''
This patch prevents ''xm dom{id,name}'' from returning stale
information
after a domain has exited.
Xend already called XendDomainInfo.update() before returning
information, but did not check to see if the result indicated that the
domain had disappeared. So, it updated the domain (which just bails
if the domain is gone) and then returned info from its internal data
structures. This means that if you run "xm destroy foo", you can then
run "xm domid" or "xm domname" many times, getting stale
info.
Instead of modifying Xend''s state in a "random place", we
just make
sure to throw an error if we know the state is invalid.
This patch causes xm-test 01_shutdown_basic_pos to pass now. Xm-test
uses domid and domname in many places to determine if a domain is
running or not (as, I would imagine, other higher-level tools might).
Having this information consistent with the actual state is a good
thing.
Signed-off-by: Dan Smith <danms@us.ibm.com>
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@us.ibm.com
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel