Add some logging to ease debugging libvirt errors
Temporary add some more logging to ease debugging libvirt errors. Unfortunatelly stack trace doesn't contain actual error. QubesOS/qubes-issues#1537
This commit is contained in:
parent
4af5a0503d
commit
530a79417f
@ -723,6 +723,8 @@ class QubesVm(object):
|
|||||||
if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
|
if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
|
||||||
return -1
|
return -1
|
||||||
else:
|
else:
|
||||||
|
print >>sys.stderr, "libvirt error code: {!r}".format(
|
||||||
|
e.get_error_code())
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
@ -778,6 +780,8 @@ class QubesVm(object):
|
|||||||
elif e.get_error_code() == libvirt.VIR_ERR_INTERNAL_ERROR:
|
elif e.get_error_code() == libvirt.VIR_ERR_INTERNAL_ERROR:
|
||||||
return 0
|
return 0
|
||||||
else:
|
else:
|
||||||
|
print >>sys.stderr, "libvirt error code: {!r}".format(
|
||||||
|
e.get_error_code())
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def get_cputime(self):
|
def get_cputime(self):
|
||||||
@ -795,6 +799,8 @@ class QubesVm(object):
|
|||||||
elif e.get_error_code() == libvirt.VIR_INTERNAL_ERROR:
|
elif e.get_error_code() == libvirt.VIR_INTERNAL_ERROR:
|
||||||
return 0
|
return 0
|
||||||
else:
|
else:
|
||||||
|
print >>sys.stderr, "libvirt error code: {!r}".format(
|
||||||
|
e.get_error_code())
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def get_mem_static_max(self):
|
def get_mem_static_max(self):
|
||||||
@ -836,6 +842,8 @@ class QubesVm(object):
|
|||||||
if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
|
if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
|
||||||
return 0
|
return 0
|
||||||
else:
|
else:
|
||||||
|
print >>sys.stderr, "libvirt error code: {!r}".format(
|
||||||
|
e.get_error_code())
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def get_disk_utilization_root_img(self):
|
def get_disk_utilization_root_img(self):
|
||||||
@ -911,6 +919,8 @@ class QubesVm(object):
|
|||||||
if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
|
if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
print >>sys.stderr, "libvirt error code: {!r}".format(
|
||||||
|
e.get_error_code())
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def is_paused(self):
|
def is_paused(self):
|
||||||
@ -923,6 +933,8 @@ class QubesVm(object):
|
|||||||
if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
|
if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
print >>sys.stderr, "libvirt error code: {!r}".format(
|
||||||
|
e.get_error_code())
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def get_start_time(self):
|
def get_start_time(self):
|
||||||
@ -1371,6 +1383,8 @@ class QubesVm(object):
|
|||||||
# already undefined
|
# already undefined
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
print >>sys.stderr, "libvirt error code: {!r}".format(
|
||||||
|
e.get_error_code())
|
||||||
raise
|
raise
|
||||||
|
|
||||||
self.storage.remove_from_disk()
|
self.storage.remove_from_disk()
|
||||||
|
Loading…
Reference in New Issue
Block a user