|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [XEND] Do not attempt core dump to direct
# HG changeset patch
# User atse@xxxxxxxxxxxxxxxxxxxxxxxx
# Node ID e6388ec26a97bade18da37741abb73b6a5530e91
# Parent 332bdaab35fa1bd9ee7f7a117a847fffbda3cddd
[XEND] Do not attempt core dump to directories.
- Abort core dump if destination is a directory.
- Throw appropriate XendError expection on failure.
Reported by Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>.
Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
tools/python/xen/xend/XendDomainInfo.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff -r 332bdaab35fa -r e6388ec26a97 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Fri Sep 22 15:56:19 2006 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py Fri Sep 22 16:20:36 2006 +0100
@@ -988,14 +988,18 @@ class XendDomainInfo:
this_time = time.strftime("%Y-%m%d-%H%M.%S", time.localtime())
corefile = "/var/xen/dump/%s-%s.%s.core" % (this_time,
self.info['name'], self.domid)
+
+ if os.path.isdir(corefile):
+ raise XendError("Cannot dump core in a directory: %s" %
+ corefile)
+
xc.domain_dumpcore(self.domid, corefile)
-
- except:
+ except RuntimeError, ex:
corefile_incomp = corefile+'-incomplete'
os.rename(corefile, corefile_incomp)
log.exception("XendDomainInfo.dumpCore failed: id = %s name = %s",
self.domid, self.info['name'])
-
+ raise XendError("Failed to dump core: %s" % str(ex))
## public:
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] [XEND] Do not attempt core dump to directories.,
Xen patchbot-unstable <=
|
|
|
|
|