[XEND] Fix fallback and error path for domain destruction by domid,

or of non-existent domain.

I saw the following error message. (A domain of domain name XXX does 
not exist.)

# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0     1019     2 r-----    29.8
# xm destroy XXX
Error: an integer is required

This patch fixes it to print the following error message.

# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0     1019     2 r-----    35.8
# xm destroy XXX
Error: the domain 'XXX' does not exist.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-08-08 10:03:30 +01:00
1 parent 0144a035fd
commit e5d1731cea
1 file changed
+2 -2
+2 -2
View File
@@ -402,9 +402,9 @@ class XendDomain:
val = dominfo.destroy()
else:
try:
val = xc.domain_destroy(domid)
val = xc.domain_destroy(int(domid))
except Exception, ex:
raise XendError(str(ex))
raise XendInvalidDomain(str(domid))
return val
def domain_migrate(self, domid, dst, live=False, resource=0, port=0):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.